Why does Assert.AreEqual(T obj1, Tobj2) fail with identical byte arrays

前端 未结 6 2013
日久生厌
日久生厌 2021-02-03 16:56

I have two identical byte arrays in the following segment of code:

    /// 
    ///A test for Bytes
    ///
    [TestMethod()]
            


        
6条回答
  •  醉酒成梦
    2021-02-03 17:17

    byte[] a = new byte[] {x, y, z...};
    byte[] b = new byte[] {x, y, z...};
    assertArrayEquals(a , b );
    

    will compare the stuff... It works for me..

提交回复
热议问题