Question 311. I Want To Serialize Instances Of My Class. Should I Use Xmlserializer, Soapformatter Or Binaryformatter?
It depends. XmlSerializer has severe limitations such as the requirement that the target class has a parameterless constructor, and only public read/write properties and fields can be serialized. However, on the plus side, XmlSerializer has good support for customising the XML document that is produced or consumed. XmlSerializer's features mean that it is most suitable
Serializes an object or graph of objects with the specified root to the given Stream. Serializes an object or graph of objects with the specified root to the given Stream in the SOAP Remote Procedure Call (RPC) format.