示例#1
0
        public async Task ReadAllBinary2Async()
        {
            using var Test = new System.IO.MemoryStream();
            Test.Write("This is a test".ToByteArray(), 0, "This is a test".Length);
            var Content = await Test.ReadAllBinaryAsync().ConfigureAwait(false);

            Assert.Equal("This is a test", System.Text.Encoding.ASCII.GetString(Content, 0, Content.Length));
        }