Gets a singleton of the BytesSerializer class
Syntax
Example
Library/Library.Test/TestPrimitiveSerializer.cs
C# | Copy Code |
---|
byte[] bytes = new byte[256];
_random.NextBytes(bytes);
using (MemoryStream ms = new MemoryStream())
{
BytesSerializer.RawBytes.WriteTo(bytes, ms);
ms.Position = 0;
Assert.AreEqual(bytes, BytesSerializer.RawBytes.ReadFrom(ms));
} |
VB.NET | Copy Code |
---|
Dim bytes As Byte() = New Byte(256) {}
_random.NextBytes(bytes)
Using ms As New MemoryStream()
BytesSerializer.RawBytes.WriteTo(bytes, ms)
ms.Position = 0
Assert.AreEqual(bytes, BytesSerializer.RawBytes.ReadFrom(ms))
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also