示例#1
0
        public void EnhancedMemoryStream_String32()
        {
            var es = new EnhancedMemoryStream();

            es.WriteString32(null);
            es.WriteString32("Hello World!");
            es.WriteString32(new String('a', 45000));

            es.Seek(0, SeekOrigin.Begin);
            Assert.IsNull(es.ReadString32());
            Assert.AreEqual("Hello World!", es.ReadString32());
            Assert.AreEqual(new String('a', 45000), es.ReadString32());
        }