Επεξεργασία

Κοινή χρήση μέσω


ReferenceEqualityComparer Class

Definition

An IEqualityComparer<T> that uses reference equality (ReferenceEquals(Object, Object)) instead of value equality (Equals(Object)) when comparing two object instances.

public ref class ReferenceEqualityComparer sealed : System::Collections::Generic::IEqualityComparer<System::Object ^>, System::Collections::IEqualityComparer
public sealed class ReferenceEqualityComparer : System.Collections.Generic.IEqualityComparer<object>, System.Collections.IEqualityComparer
type ReferenceEqualityComparer = class
    interface IEqualityComparer<obj>
    interface IEqualityComparer
Public NotInheritable Class ReferenceEqualityComparer
Implements IEqualityComparer, IEqualityComparer(Of Object)
Inheritance
ReferenceEqualityComparer
Implements

Remarks

The ReferenceEqualityComparer type cannot be instantiated. Instead, use the Instance property to access the singleton instance of this type.

Properties

Instance

Gets the singleton ReferenceEqualityComparer instance.

Methods

Equals(Object, Object)

Determines whether two object references refer to the same object instance.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetHashCode(Object)

Returns a hash code for the specified object. The returned hash code is based on the object identity, not on the contents of the object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to