XNodeEqualityComparer Class

Definition

比較節點以判斷它們是否相等。Compares nodes to determine whether they are equal. 這個類別無法被繼承。This class cannot be inherited.

public ref class XNodeEqualityComparer sealed : System::Collections::Generic::IEqualityComparer<System::Xml::Linq::XNode ^>, System::Collections::IEqualityComparer
public sealed class XNodeEqualityComparer : System.Collections.Generic.IEqualityComparer<System.Xml.Linq.XNode>, System.Collections.IEqualityComparer
type XNodeEqualityComparer = class
    interface IEqualityComparer<XNode>
    interface IEqualityComparer
type XNodeEqualityComparer = class
    interface IEqualityComparer
    interface IEqualityComparer<XNode>
Public NotInheritable Class XNodeEqualityComparer
Implements IEqualityComparer, IEqualityComparer(Of XNode)
Inheritance
XNodeEqualityComparer
Implements

Remarks

這個類別的目的是要執行 System.Collections.IEqualityComparerSystem.Collections.Generic.IEqualityComparer<T>The purpose of this class is to implement System.Collections.IEqualityComparer and System.Collections.Generic.IEqualityComparer<T>. 需要識別的類別(例如 Dictionary<TKey,TValue>)需要可執行其中一個介面之類別的實例。Classes that require identity (such as Dictionary<TKey,TValue> ) require an instance of a class that implements one of these interfaces.

Constructors

XNodeEqualityComparer()

XNodeEqualityComparer 類別的新執行個體初始化。Initializes a new instance of the XNodeEqualityComparer class.

Methods

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Equals(XNode, XNode)

比較兩個節點的值。Compares the values of two nodes.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetHashCode(XNode)

根據 XNode 傳回雜湊程式碼。Returns a hash code based on an XNode.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IEqualityComparer.Equals(Object, Object)

比較兩個節點的值。Compares the values of two nodes.

IEqualityComparer.GetHashCode(Object)

根據節點的值傳回雜湊碼。Returns a hash code based on the value of a node.

Applies to

See also