T
Tom
What's the best way to compare two byte arrays? Right now I am converting
them to base64 strings and comparing those, as so:
'result1 and result2 are two existing byte arrays that have been loaded
Dim data64_1 As String = System.Convert.ToBase64String(result1, 0,
result1.Length)
Dim data64_2 As String = System.Convert.ToBase64String(result2, 0,
result2.Length)
Debug.WriteLine(IIf(data64_1 = data64_2, "Equals", "NOT Equals"))
Seems like there should be an easier way.... but neither IS nor = works, and
there isn't any Compare verb or anything. I could, obviously, loop thru each
one and compare each byte, but that seems like too much effort.
What am I missing?
Tom
them to base64 strings and comparing those, as so:
'result1 and result2 are two existing byte arrays that have been loaded
Dim data64_1 As String = System.Convert.ToBase64String(result1, 0,
result1.Length)
Dim data64_2 As String = System.Convert.ToBase64String(result2, 0,
result2.Length)
Debug.WriteLine(IIf(data64_1 = data64_2, "Equals", "NOT Equals"))
Seems like there should be an easier way.... but neither IS nor = works, and
there isn't any Compare verb or anything. I could, obviously, loop thru each
one and compare each byte, but that seems like too much effort.
What am I missing?
Tom