Consider the following code:
byte[] bytes = new byte[] { 1, 2, 5, 0, 6 };
byte[] another = new byte[] { 1, 2, 5, 0, 6 };
Hashtable ht = new Hashtable();
ht.Add(
Being an array of a primitive type shouldn't use using the object reference, should it?
Yes it should. Arrays are reference types.
Everything is working as it's supposed to.
If you want different behaviour, you can implement a comparator for arrays that compares the contents and pass that to the hashtable.