asked on
Private Function FileCompare(ByVal file1 As String, ByVal file2 As String) As Boolean
Dim file1byte As Integer
Dim file2byte As Integer
Dim fs1 As FileStream
Dim fs2 As FileStream
If (file1 = file2) Then
Return True
End If
fs1 = New FileStream(file1, FileMode.Open)
fs2 = New FileStream(file2, FileMode.Open)
If (fs1.Length <> fs2.Length) Then
fs1.Close()
fs2.Close()
Return False
End If
Do
file1byte = fs1.ReadByte()
file2byte = fs2.ReadByte()
Loop While ((file1byte = file2byte) And (file1byte <> -1))
fs1.Close()
fs2.Close()
Return ((file1byte - file2byte) = 0)
End Function
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,
TRUSTED BY
2. How will the output of this function be used?