| Сравнить файлы |
|
Импортируйте System.IO. Код: Dim Hash As System.Security.Cryptography.HashAlgorithm Hash = System.Security.Cryptography.HashAlgorithm.Create() Dim fsA As New FileStream("first.txt", FileMode.Open) Dim HashA() As Byte = Hash.ComputeHash(fsA) fsA.Close() Dim fsB As New FileStream("second.txt", FileMode.Open) Dim HashB() As Byte = Hash.ComputeHash(fsB) fsB.Close() If BitConverter.ToString(HashA) = _ BitConverter.ToString(HashB) Then MsgBox("Файлы одинаковые") Else MsgBox("Файлы НЕ одинаковые") End If |