I have two List<FileInfo> , and I want to return a common FileItem between them.
List<FileInfo> outputList = new List<FileInfo>(); outputList = list1.Intersect(list2).ToList();
However, I am returning an empty list.
Both lists contain FileInfo found
System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(startFolder); IEnumerable<System.IO.FileInfo> fileList = dir.GetFiles("*.*", System.IO.SearchOption.AllDirectories);
And it is filtered by requests.
source share