Compare Byte Arrays
There's a new built-in solution for this in .NET 4 - IStructuralEquatable static bool ByteArrayCompare(byte[] a1, byte[] a2) { return StructuralComparisons.StructuralEqualityComparer.Equals(a1, a2); }