Serialization
Up to this point, this chapter has covered how to work with files and streams. There is obviously great utility in being able to write data to various media such as disk and memory. There is greater utility in being able to write your .NET types, including their state to the same media. This is possible by using serialization. Serialization is a process that converts classes to a stream of bytes that can be persisted or transferred to another process and even another computer. Deserialization is the reverse process of reading the stream of bytes from a file or from a remote computer and reconstructing the class it contains, including its state.
Consider the possibilities. You can create your own custom class, create an instance, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access