I have a List defined like this :
public List AttachmentURLS;
I am adding items to the list like this:
instructio
Move the .ToList()
to the end like this
instruction.AttachmentURLS = curItem
.Attributes["ows_Attachments"]
.Value
.Split(';')
.Where(Attachment => !String.IsNullOrEmpty(Attachment))
.ToList();
The Where extension method returns IEnumerable
and Where
will work on arrays, so the ToList
isn't needed after the Split
.