Can I use a fancy LINQ query to return a List<FileInfo>
, by passing it in a method (List<FileInfo> oldList, List<FileInfo> newList
), and seeing what differences there are between the two lists?
Basically, I want to get a list of any files added to newList, that were not available in oldList.
Given an
IEqualityComparer
forFileInfo
shown below:You can use following code to find the difference between two lists:
To find items added to
newList
list, use following code: