Share via


XNodeEqualityComparer Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Compares nodes to determine whether they are equal. This class cannot be inherited.

Inheritance Hierarchy

System.Object
  System.Xml.Linq.XNodeEqualityComparer

Namespace:  System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

Syntax

'Declaration
Public NotInheritable Class XNodeEqualityComparer _
    Implements IEqualityComparer(Of XNode)
public sealed class XNodeEqualityComparer : IEqualityComparer<XNode>

The XNodeEqualityComparer type exposes the following members.

Constructors

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 XNodeEqualityComparer Initializes a new instance of the XNodeEqualityComparer class.

Top

Methods

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Equals(XNode, XNode) Compares the values of two nodes.
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetHashCode() Serves as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetHashCode(XNode) Returns a hash code based on an XNode.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 GetType Gets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 IEqualityComparer.Equals Compares the values of two nodes.
Explicit interface implemetationPrivate methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 IEqualityComparer.GetHashCode Returns a hash code based on the value of a node.

Top

Remarks

The purpose of this class is to implement System.Collections.IEqualityComparer and System.Collections.Generic.IEqualityComparer<T>. Classes that require identity (such as Dictionary<TKey, TValue> ) require an instance of a class that implements one of these interfaces.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.