XNamespace.Equals Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Determines whether the specified XNamespace is equal to the current XNamespace.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
Parameters
- obj
- Type: System.Object
The XNamespace to compare to the current XNamespace.
Return Value
Type: System.BooleanA Boolean that indicates whether the specified XNamespace is equal to the current XNamespace.
For two XNamespace objects to be equal, they must have the same URI.
The following example compares two namespaces that refer to the same URI.
'add the following line to the the Imports section: 'Imports <xmlns:aw="http://www.adventure-works.com"> Dim output As New StringBuilder output.Append(String.Format(GetXmlNamespace(aw) = "http://www.adventure-works.com")) output.Append(Environment.NewLine) OutputTextBlock.Text = output.ToString()
Show: