Export (0) Print
Expand All

XNamespace Implicit Conversion (String to XNamespace)

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();


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