Is there an easy way to convert a byte array to a string so the following unit test passes? I can't find an encoding that works for all values.
  [TestMethod]
  public void TestBytToString()
  {
     byte[] bytArray = new byte[256];
     for (int i = 0; i < bytArray.Length; i++)
     {
        bytArray[i] = (byte)i;
     }
     string x = System.Text.Encoding.Default.GetString(bytArray);
     for (int i = 0; i < x.Length; i++)
     {
        int y = (int)x[i];
        Assert.AreEqual(i, y);
     }
  }
 
     
     
     
    