XName.NamespaceName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the URI of the XNamespace for this XName.
public:
property System::String ^ NamespaceName { System::String ^ get(); };
public string NamespaceName { get; }
member this.NamespaceName : string
Public ReadOnly Property NamespaceName As String
Property Value
The URI of the XNamespace for this XName.
Examples
This example creates an element in a namespace, and then prints the element's namespace.
XNamespace aw = "http://www.adventure-works.com";
XElement root = new XElement(aw + "Root");
Console.WriteLine(root.Name.NamespaceName);
Imports <xmlns="http://www.adventure-works.com">
Module Module1
Sub Main()
Dim root As XElement = <Root/>
Console.WriteLine(root.Name.NamespaceName)
End Sub
End Module
This example produces the following output:
http://www.adventure-works.com
Remarks
This is a convenience property to get the namespace name from an XName.
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.