This query determines whether the two folders contain IEnumerable list2 = dir2.GetFiles("*.*", System.IO.SearchOption.AllDirectories) įileCompare myFileCompare = new FileCompare() IEnumerable list1 = dir1.GetFiles("*.*", System.IO.SearchOption.AllDirectories) System.IO.DirectoryInfo dir2 = new System.IO.DirectoryInfo(pathB) String pathA = pathB = dir1 = new System.IO.DirectoryInfo(pathA) on a local drive and change these file paths. Create two identical or different temporary folders In a real-world scenario, you should modify this comparer to perform a more rigorous equality check. It just uses the name and length in bytes of each file to determine whether the contents of each folder are identical or not. The class is not intended for use in real-world scenarios. The FileComparer class shown here demonstrates how to use a custom comparer class together with the Standard Query Operators. The techniques shown here can be adapted to compare sequences of objects of any type.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |