淘先锋技术网

首页 1 2 3 4 5 6 7
       /// <summary>
       /// 数组比较是否相等
        /// </summary>
       /// <param name="bt1">数组1</param>
       /// <param name="bt2">数组2</param>
       /// <returns>true:相等,false:不相等</returns>
       public bool CompareArray(byte[] bt1, byte[] bt2)
       {
           var len1 = bt1.Length;
           var len2 = bt2.Length;
           if (len1 != len2)
           {
               return false;
           }
           for (var i = 0; i < len1; i++)
           {
               if (bt1[i] != bt2[i])
                   return false;
           }
           return true;
       }