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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για