June 2003
Intermediate to advanced
800 pages
34h 20m
English
You want to serialize an object that isn’t marked with the Serializable attribute.
Use the System.Xml.Serialization.XmlSerializer class, which provides a more limited form of serialization.
The XmlSerializer class allows you to serialize an object that isn’t explicitly marked as serializable. This is especially convenient if you need to store state for an object and you aren’t able to modify the class code to make it serializable (perhaps because you don’t have access to the source code).
The XmlSerializer class works much like the binary and SOAP formatters described in recipe Serialize an Object to Disk, but with several limitations. First of all, it doesn’t store any ...
Read now
Unlock full access