XmlSerializer.Serialize Method (XmlWriter, Object, XmlSerializerNamespaces)
July 28, 2014
Assembly: System.Xml.Serialization (in System.Xml.Serialization.dll)
public void Serialize( XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces )
When the Serialize method is invoked, the public fields and read/write properties of an object are converted into XML. Methods, indexers, private fields, and read-only properties are not serialized.
Use the xmlWriter parameter to specify an object that derives from the abstract XmlWriter class, which is designed to write XML documents.