May 2010
Intermediate to advanced
1752 pages
41h 17m
English
Once you configure your types to participate in the .NET serialization scheme by applying the necessary attributes, your next step is to choose which format (binary, SOAP, or XML) you should use when persisting your object's state. Each possibility is represented by the following classes:
BinaryFormatter
SoapFormatter
XmlSerializer
The BinaryFormatter type serializes your object's state to a stream using a compact binary format. This type is defined within the System.Runtime.Serialization.Formatters.Binary namespace that is part of mscorlib.dll. If you wish to gain access to this type, you can specify the following C# using directive:
// Gain access to the BinaryFormatter in mscorlib.dll. using System.Runtime.Serialization.Formatters.Binary; ...