I am using the following query
var queryList1Only = (from file in list1 select file).Except(list2, myFileCompare);
while myFileCompare matches 2 files based on name and length.
The query returned results if list1 and list2 were small (say 100 files during testing), then I increased list1 to 30,000 files and list2 to 20,000 files, and now the query says "Function Evaluation Timed Out" .
I searched the Internet and found that debugging could trigger it, so I deleted all the breakpoints and ran the code, now the program just froze, without output for queryList1Only I'm trying to print to check it.
EDIT: This is the code for myFileCompare
class FileCompare : System.Collections.Generic.IEqualityComparer<System.IO.FileInfo> { public FileCompare() { } public bool Equals(System.IO.FileInfo f1, System.IO.FileInfo f2) { return (f1.Name == f2.Name && f1.Directory.Name == f2.Directory.Name && f1.Length == f2.Length); }
source share