Namespace: DeltaEngine.Tests.Datatypes
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test] public void SaveAndLoadRectangleManuallyWithBinaryWriterAndReader() { using (var dataStream = new MemoryStream()) { var writer = new BinaryWriter(dataStream); var data = Rectangle.One; BinaryDataExtensions.Save(data, writer); dataStream.Seek(0, SeekOrigin.Begin); var reader = new BinaryReader(dataStream); data = (Rectangle)reader.Create(); Assert.AreEqual(Rectangle.One, data); } }
See Also