O'Reilly logo

Microsoft® Visual J#™ .NET (Core Reference) by John/Longshaw, Andy Sharp

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

Advanced Serialization

You’ve seen how basic serialization is performed and controlled using attributes. But at times you’ll need more control over how an object or a collection of objects is serialized and deserialized. We’ll look at this next.

Customizing Serialization

You can influence the format of the serialization stream used to serialize an object by implementing the System.Runtime.Serialization.ISerializable interface. This is useful if you need to perform some additional or nonstandard processing as part of the serialization process. A large number of classes in the .NET Framework Class Library implement the ISerializable interface.

For example, consider the FileStream member variable in the Widget class discussed in the previous section. ...

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