how can i compare the items in a string[] array against a generic list that contains objects using LINQ?
this generic list contains objects called picInfo. picinfo class looks like this:
[ProtoContract]
public class PicInfo
{
[ProtoMember(1)]
public string fileName { get; set; }
[ProtoMember(2)]
public string completeFileName { get; set; }
[ProtoMember(3)]
public string filePath { get; set; }
[ProtoMember(4)]
public byte[] hashValue { get; set; }
public PicInfo() { }
}
the string[] array contains filepaths of pictures. im trying to check if the generic list already contains the path of this particular picture.
the generic list of the pictures looks like this:
List<PicInfo> pi = new List<PicInfo>();
if the generic list already has that picture, i'd like to remove the item from the string[] array.
i can do this using the foreach loop and compare the items 1 by 1. but how can i do this using linq?
thanks in advance!