Export (0) Print
Expand All

XmlSerializerNamespaces.Add Method

Adds a prefix and namespace pair to an XmlSerializerNamespaces object.

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

'Declaration
Public Sub Add ( _
	prefix As String, _
	ns As String _
)

Parameters

prefix
Type: System.String
The prefix associated with an XML namespace.
ns
Type: System.String
An XML namespace.

If you want the XmlSerializer to qualify the element and attribute names in an XML document, you must Add the prefix and namespace pairs to an XmlSerializerNamespaces object.

Any namespaces that you add must conform to the www.w3.org specification, Namespaces in XML.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft