XmlSerializer.Serialize Method (XmlWriter, Object)
February 14, 2014
Assembly: System.Xml.Serialization (in System.Xml.Serialization.dll)
The Serialize method converts the public fields and read/write properties of an object into XML. It does not convert methods, indexers, private fields, or read-only properties.
In the xmlWriter parameter, specify an object that derives from the abstract XmlWriter class.