Objects Serialization
Serializing .NET objects is the easiest serialization mode. In this particular scenario you need a file stream where you have to place data and a formatter establishing the serialization mode. When you have the formatter instance, you simply invoke the Serialize method. The System.Runtime.Serialization.Formatters namespace provides two sub namespaces, Binary and Soap, exposing respectively the following formatters: BinaryFormatter and SoapFormatter. The first one serializes objects in a binary way. It is efficient but you should use it only if you are sure that your objects will be deserialized by .NET applications, because such binary format is not universal. If you instead want to be sure that your objects can be shared ...
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