Application #82. Serialize Objects
Serialization is the process of converting an object into a linear sequence of bytes. This is a powerful technique that has several practical uses, such as persisting an object’s state to disk. For example, a word-processing document might exist as an object. Using serialization, the word-processing document can be saved to a file on disk for later retrieval. When the user wants to reopen the document, it’s deserialized and the document is restored. Other uses include cloning objects and remoting.
The sample application, shown in Figure 9-5, allows the user to serialize a class by using either SOAP or binary format. The six grouped command buttons are for serializing and deserializing. The bottom two buttons ...
Get 101 Microsoft® Visual Basic® .NET Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.