Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlSerializerNamespaces Constructor (XmlSerializerNamespaces^)

 

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

Initializes a new instance of the XmlSerializerNamespaces class, using the specified instance of XmlSerializerNamespaces containing the collection of prefix and namespace pairs.

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

public:
XmlSerializerNamespaces(
	XmlSerializerNamespaces^ namespaces
)

Parameters

namespaces
Type: System.Xml.Serialization::XmlSerializerNamespaces^

An instance of the XmlSerializerNamespacescontaining the namespace and prefix pairs.

The following example creates two XmlQualifiedName objects, and creates a new XmlSerializerNamespaces instance from them.

private:
   XmlSerializerNamespaces^ CreateFromQNames()
   {
      XmlQualifiedName^ q1 =
         gcnew XmlQualifiedName( "money","http://www.cohowinery.com" );

      XmlQualifiedName^ q2 =
         gcnew XmlQualifiedName( "books","http://www.cpandl.com" );

      array<XmlQualifiedName^>^ names = { q1, q2 };

      return gcnew XmlSerializerNamespaces( names );
   }

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft