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, ...

Get Delphi for .NET Developer’s Guide 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.