June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to compare the bytes in two byte arrays to see if they have the same information.
Iterate over the array and compare each byte, or use the BitConverter.ToString method to create a string representation of the entire array.
There is no way to directly test to arrays for equal content. You can use the Is operator, but this will only return True if both variables point to the same array. It will fail if the arrays are duplicate copies of identical data.
If Array1 Is Array2 Then
' This is a reference comparison, which only tests whether
' the variables reference the same array object.
End IfA shortcut is to use the BitConverter.ToString method to put both byte arrays into a standard string ...
Read now
Unlock full access