ToString Method
Collapse the table of content
Expand the table of content

XNamespace.ToString Method

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

Returns the URI of this XNamespace.

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

'Declaration
Public Overrides Function ToString As String

Return Value

Type: System.String
The URI of this XNamespace.

The following example uses this method to print a namespace on the console.


Dim output As New StringBuilder
'add the following line to the the Imports section:
'Imports <xmlns="http://www.adventure-works.com">
Dim aw As XNamespace = GetXmlNamespace()
output.Append(String.Format("{0}", aw))
output.Append(Environment.NewLine)

OutputTextBlock.Text = output.ToString()


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft