IBinarySerialize::Write Method
Converts a user-defined type (UDT) or user-defined aggregate into its binary format so that it may be persisted.
Assembly: System.Data (in System.Data.dll)
Parameters
- w
- Type: System.IO::BinaryWriter
The BinaryWriter stream to which the UDT or user-defined aggregate is serialized.
Write sufficient information to the binary stream to allow the Read method to reconstitute your UDT or user-defined aggregate.
The following example shows the implementation of the Writemethod of a UDT, which uses a BinaryWriter to serialize the UDT in the user-defined binary format. The purpose of the null character padding is to ensure that the string value is completely separated from the double value, so that one UDT is compared to another in Transact-SQL code, string bytes are compared to string bytes and double bytes are compared to double bytes.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.