XmlSerializer Constructor (XmlTypeMapping)
Initializes an instance of the XmlSerializer class using an object that maps one type to another.
Assembly: System.Xml (in System.Xml.dll)
The following example serializes a class named Group. The serialization of the GroupName, IgnoreThis fields, and the members of the GroupType enumeration are overridden. In the CreateOverrideSerializer method, a SoapAttributeOverrides object is created, and for each overridden member or enumeration, a SoapAttributes object is created with the appropriate property set and added to the SoapAttributeOverrides object. An XmlMapping object is created using the SoapAttributeOverrides object, and that XmlMapping object is used to create the XmlSerializer that overrides the default serialization.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, 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.