You need to quickly compare the content of two files.
Calculate the hash code of each file using the HashAlgorithm class, and compare the hash codes.
There are a number of ways you might want to compare more than one file. For example, you could examine a portion of the file for similar data, or you could read through each file byte-by-byte, comparing each byte as you go. Both of these approaches are valid, but in some cases it’s more convenient to use a hash code algorithm.
A hash code algorithm generates a small (typically about 20 bytes) binary fingerprint for a file. While it’s possible for different files to generate the same hash codes, it’s statistically unlikely. In fact, even a minor change ...