Export (0) Print
Expand All

DataContractSerializer Constructor

Initializes a new instance of the DataContractSerializer class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Supported by Silverlight for Windows Phone DataContractSerializer(Type) Initializes a new instance of the DataContractSerializer class to serialize or deserialize an object of the specified type.
Public method Supported by Silverlight for Windows Phone DataContractSerializer(Type, IEnumerable<Type>) Initializes a new instance of the DataContractSerializer class to serialize or deserialize an object of the specified type, and a collection of known types that may be present in the object graph.
Public method Supported by Silverlight for Windows Phone DataContractSerializer(Type, String, String) Initializes a new instance of the DataContractSerializer class to serialize or deserialize an object of the specified type using the supplied XML root element and namespace.
Public method Supported by Silverlight for Windows Phone DataContractSerializer(Type, XmlDictionaryString, XmlDictionaryString) Initializes a new instance of the DataContractSerializer class to serialize or deserialize an object of the specified type using the XML root element and namespace specified through the parameters of type XmlDictionaryString.
Public method Supported by Silverlight for Windows Phone DataContractSerializer(Type, String, String, IEnumerable<Type>) Initializes a new instance of the DataContractSerializer class to serialize or deserialize an object of the specified type. This method also specifies the root XML element and namespace in two string parameters as well as a list of known types that may be present in the object graph.
Public method Supported by Silverlight for Windows Phone DataContractSerializer(Type, XmlDictionaryString, XmlDictionaryString, IEnumerable<Type>) Initializes a new instance of the DataContractSerializer class to serialize or deserialize an object of the specified type. This method also specifies the root XML element and namespace in two XmlDictionaryString parameters as well as a list of known types that may be present in the object graph.
Top

Exception Condition
InvalidDataContractException

The type being serialized does not conform to data contract rules. For example, the DataContractAttribute attribute has not been applied to the type.

Community Additions

ADD
Show:
© 2015 Microsoft