Comparing 2 byte array in C#
public static bool IsEquals(this byte[] o1, byte[] o2)
{
if (o1 == null && o2 != null)
return false;
if (o1 != null && o2 == null)
return false;
if (o1 == null && o2 == null)
return true;
return o1.SequenceEqual(o2);
}