XmlSerializer Constructor (Type, XmlAttributeOverrides, Type[], XmlRootAttribute, String, String, Evidence)

XmlSerializer Constructor (Type, XmlAttributeOverrides, Type[], XmlRootAttribute, String, String, Evidence)

Note: This API is now obsolete.

This API supports the product infrastructure and is not intended to be used directly from your code.

Initializes a new instance of the XmlSerializer class that can serialize objects of the specified type into XML document instances, and deserialize XML document instances into objects of the specified type. This overload allows you to supply other types that can be encountered during a serialization or deserialization operation, as well as a default namespace for all XML elements, the class to use as the XML root element, its location, and credentials required for access.

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

[ObsoleteAttribute("This method is obsolete and will be removed in a future release of the .NET Framework. Please use a XmlSerializer constructor overload which does not take an Evidence parameter. See http://go2.microsoft.com/fwlink/?LinkId=131738 for more information.")]
public XmlSerializer(
	Type type,
	XmlAttributeOverrides overrides,
	Type[] extraTypes,
	XmlRootAttribute root,
	string defaultNamespace,
	string location,
	Evidence evidence


Type: System.Type

The type of the object that this XmlSerializer can serialize.

Type: System.Xml.Serialization.XmlAttributeOverrides

An XmlAttributeOverrides that extends or overrides the behavior of the class specified in the type parameter.

Type: System.Type[]

A Type array of additional object types to serialize.

Type: System.Xml.Serialization.XmlRootAttribute

An XmlRootAttribute that defines the XML root element properties.

Type: System.String

The default namespace of all XML elements in the XML document.

Type: System.String

The location of the types.

Type: System.Security.Policy.Evidence

An instance of the Evidence class that contains credentials required to access types.

Allows more precise control over access to a temporary directory and prevents code injection and exploitation. To use this method, specify a location and give access only to specific users. Administrators can set up policies with evidence lists that match evidence to permissions.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft