System.Xml.Serialization.XmlSerializerFactory.CreateSerializer Method

Returns a derivation of the System.Xml.Serialization.XmlSerializer class that can serialize objects of the specified type into XML documents, and vice versa. Specifies the object that represents the XML root element.

Syntax

public XmlSerializer CreateSerializer (Type type, XmlRootAttribute root)

Parameters

type
The Type to serialize.
root
An System.Xml.Serialization.XmlRootAttribute that represents the XML root element.

Returns

A derivation of the System.Xml.Serialization.XmlSerializer.

Remarks

Calling this overload is similar to calling the XmlSerializer.#ctor(Type, XmlRootAttribute) to create an instance of the System.Xml.Serialization.XmlSerializer class.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0