Implicit Conversion (String to XNamespace)
Collapse the table of content
Expand the table of content

XNamespace Implicit Conversion (String to XNamespace)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Converts a string containing a Uniform Resource Identifier (URI) to an XNamespace.

This API is not CLS-compliant. 

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

public static implicit operator XNamespace (
	string namespaceName
)

Parameters

namespaceName
Type: System.String
A String that contains the namespace URI.

Return Value

Type: System.Xml.Linq.XNamespace
An XNamespace constructed from the URI string.

The following example shows the initialization of an XNamespace variable by assigning a string to it.


StringBuilder output = new StringBuilder();
XNamespace aw = "http://www.adventure-works.com";
output.Append(aw);

OutputTextBlock.Text = output.ToString();


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft