June 2003
Intermediate to advanced
800 pages
34h 20m
English
You need to persist a serializable object to a file and recreate it later.
Use .NET serialization with the help of BinaryFormatter or SoapFormatter.
All serializable objects can be converted into a stream of bytes, and vice versa. To serialize an object manually, you need to use a class that supports IFormatter. The .NET Framework includes two: BinaryFormatter, which serializes an object to a compact binary representation, and SoapFormatter, which uses the SOAP XML format, and results in a longer text-based message. The BinaryFormatter class is found in the System.Runtime.Serialization.Formatters.Binary namespace, while SoapFormatter is found in the System.Runtime.Serialization.Formatters.Soap ...
Read now
Unlock full access