可以考虑hash试试,将每个byte[]的个数及每个值组成一个字符串,然后取得其hash值,再比较。

解决方案 »

  1.   

    byte[] byte_First ;
    byte[] byte_Second ;bool bool_Result = byte_First.Equals(byte_Second);
      

  2.   

    try:static bool ByteEquals(byte[] b1,byte[] b2){
         if(b1.Length != b2.Length) return false;
         if(b1 == null || b2 == null) return false;
         for(int i = 0; i < b1.Length; i++)
          if(b1[i] != b2[i])
            return false;
         return true;
      }
    michaelowenii(少年狂)的方法:
    byte[] b1 = {0x1,0x2,0x3},b2 = {0x1,0x2,0x3}; 将返回false---可能不是楼主所期望的
      

  3.   

    是的,我看了一下,确实返回了 : false .
    非常抱歉,楼主!
    对于 FileNewExit((呵呵)) 给我的提示,表示感谢!
      

  4.   

    汗~~if(b1.Length != b2.Length) return false;
    if(b1 == null || b2 == null) return false;----->if(b1 == null || b2 == null) return false;
    if(b1.Length != b2.Length) return false;