XNamespace.Equals(Object) Method
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.
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
Parameters
- obj
- Object
The XNamespace to compare to the current XNamespace.
Returns
A Boolean that indicates whether the specified XNamespace is equal to the current XNamespace.
Examples
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
Remarks
For two XNamespace objects to be equal, they must have the same URI.
Applies to
See also
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.