XNamespace.Equals(Object) Method
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.
Determines whether the specified XNamespace is equal to the current XNamespace.
public:
override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
public override bool Equals (object? obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean
- obj
- Object
The XNamespace to compare to the current XNamespace.
A Boolean that indicates whether the specified XNamespace is equal to the current XNamespace.
The following example compares two namespaces that refer to the same URI.
XNamespace aw = "http://www.adventure-works.com";
Console.WriteLine(aw == "http://www.adventure-works.com");
Imports <xmlns:aw="http://www.adventure-works.com">
Module Module1
Sub Main()
Console.WriteLine(GetXmlNamespace(aw) = "http://www.adventure-works.com")
End Sub
End Module
This example produces the following output:
True
For two XNamespace objects to be equal, they must have the same URI.
.NET-feedback
.NET is een open source project. Selecteer een koppeling om feedback te geven: