O'Reilly logo

Microsoft®C# Programming for the absolute beginner by Andy Harris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing Entire Objects with Serialization

Text-based files are very easy to work with as long as the information is not long or complex. However, many applications require manipulation of more complex data. In an object-oriented language such as C#, it makes sense to be able to save and load objects directly, because objects are the primary unit in an OOP program. C# provides a mechanism for easily storing and loading classes–object serialization. In general, you can store any kind of information you can put in a class, and you can easily retrieve the information.

Exploring the Serialization Demo Program

An example will help explain the concept of object serialization. The Serialization Demo program featured in Figure 9.18 illustrates object serialization ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required