I have the following code:
SPList list = web.Lists[this.ListName];
SPListItem item = list.Items.Add();
now what I want to do is:
FileInfo[] attachments = attachmentDirectory.GetFiles();
foreach (FileInfo attachment in attachments)
{
// Add the attachment from file system to the list item...
}
How do I convert a normal file to a byte array?