/// <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; }
转载于:https://www.cnblogs.com/zhangwei595806165/p/3811916.html