Answers for "c# check file similarities"

C#
0

c# check file similarities

public static bool AreFileContentsEqual(FileInfo fi1, FileInfo fi2) =>
    fi1.Length == fi2.Length &&
    (fi1.Length == 0 || File.ReadAllBytes(fi1.FullName).SequenceEqual(
                        File.ReadAllBytes(fi2.FullName)));
Posted by: Guest on September-08-2021
0

c# check file similarities

public static bool AreFileContentsEqual(String path1, String path2) =>
              File.ReadAllBytes(path1).SequenceEqual(File.ReadAllBytes(path2));
Posted by: Guest on September-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language