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 حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.