XmlSerializer.Serialize Method (XmlWriter, Object, XmlSerializerNamespaces, String, String)
.NET Framework 4.5
Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
'Declaration Public Sub Serialize ( _ xmlWriter As XmlWriter, _ o As Object, _ namespaces As XmlSerializerNamespaces, _ encodingStyle As String, _ id As String _ )
Parameters
- xmlWriter
- Type: System.Xml.XmlWriter
The XmlWriter used to write the XML document.
- o
- Type: System.Object
The object to serialize.
- namespaces
- Type: System.Xml.Serialization.XmlSerializerNamespaces
An instance of the XmlSerializaerNamespaces that contains namespaces and prefixes to use.
- encodingStyle
- Type: System.String
The encoding used in the document.
- id
- Type: System.String
For SOAP encoded messages, the base used to generate id attributes.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.