Class IdentityComparer<T>
Represents a comparison operation that tests equality by reference
instead of equality by value. Basically, the comparison is done by
checking if
returns true rather than by calling the "Equals" function.
Inheritance
System.Object
IdentityComparer<T>
Assembly: Lucene.Net.dll
Syntax
public class IdentityComparer<T> : IEqualityComparer<T> where T : class
Type Parameters
Name |
Description |
T |
The type of object to test for reference equality. Must be a class, not a struct.
|
Properties
|
Improve this Doc
View Source
Default
Gets an IdentityComparer<T> object that tests equality by reference
instead of equality by value. Basically, the comparison is done by
checking if
returns true rather than by calling the "Equals" function.
Declaration
public static IdentityComparer<T> Default { get; }
Property Value
Methods
|
Improve this Doc
View Source
Equals(T, T)
Declaration
public bool Equals(T x, T y)
Parameters
Type |
Name |
Description |
T |
x |
|
T |
y |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetHashCode(T)
Declaration
public int GetHashCode(T obj)
Parameters
Type |
Name |
Description |
T |
obj |
|
Returns
Type |
Description |
System.Int32 |
|