C# enables you to save an entire object, including all its data (called an object-graph) through a process called serialization. Serialization lets you write entire objects out to disk and read them back in later. Objects that pass between assembly boundaries (through a process called marshalling) are also serialized.
You use the BinaryFormatter class to serialize and deserialize objects; the significant public methods of this class appear in Table 5.19.
|Deserialize||Deserializes a stream into an object-graph.|
|Serialize||Serializes an object to the given stream.|
Here's an example, ch05_13.cs, which will serialize and deserialize an object. The ch05_13 class contains ...