title: Why does Assert.AreEqual(T obj1, Tobj2) fail with identical byte arrays
body: <p>I have two identical byte arrays in the following segment of code:</p>
  
  <pre><code>    /// &lt;summary&gt;
      ///A test for Bytes
      ///&lt;/summary&gt;
      [TestMethod()]
      public void BytesTest() {
          byte[] bytes = Encoding.UTF8.GetBytes(Properties.Resources.ExpectedPacketData);
          TransferEventArgs target = new TransferEventArgs(bytes);
  
          byte[] expected = Encoding.UTF8.GetBytes(Properties.Resources.ExpectedPacketValue);
          byte[] actual;
          actual = target.Bytes;
  
          Assert.AreEqual(expected, actual);
      }
  </code></pre>
  
  <p>Both arrays are identical down to the very byte. In this scenario, why would Assert.AreEqual fail?</p>