示例#1
0
        public void ReadAllBinary2()
        {
            using var Test = new System.IO.MemoryStream();
            Test.Write("This is a test".ToByteArray(), 0, "This is a test".Length);
            var Content = Test.ReadAllBinary();

            Assert.Equal("This is a test", System.Text.Encoding.ASCII.GetString(Content, 0, Content.Length));
        }
 public void ReadAllBinary2()
 {
     using (System.IO.MemoryStream Test = new System.IO.MemoryStream())
     {
         Test.Write("This is a test".ToByteArray(), 0, "This is a test".Length);
         byte[] Content = Test.ReadAllBinary();
         Assert.Equal("This is a test", System.Text.Encoding.ASCII.GetString(Content, 0, Content.Length));
     }
 }