Class LevelEqualityComparer<T>
Compares two types based on their member values up to a certain depth.
Inheritance
System.Object
LevelEqualityComparer<T>
Implements
IEqualityComparer
Namespace: Cortex.Net.Utils
Assembly: Cortex.Net.dll
Syntax
public class LevelEqualityComparer<T> : IEqualityComparer<T>, IEqualityComparer
Type Parameters
Name | Description |
---|---|
T | The types to compare. |
Constructors
| Improve this Doc View SourceLevelEqualityComparer(Int32)
Initializes a new instance of the LevelEqualityComparer<T> class.
Declaration
public LevelEqualityComparer(int depth)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | depth | The depth up to where needs to be checked. |
Methods
| Improve this Doc View SourceEquals(T, T)
Determines whether the specified objects are equal.
Declaration
public bool Equals(T x, T y)
Parameters
Type | Name | Description |
---|---|---|
T | x | The first object of type T to compare. |
T | y | The second object of type T to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified objects are equal; otherwise, false. |
GetHashCode(T)
Returns a hash code for the specified object.
Declaration
public int GetHashCode(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj | The instance of type T for which a hash code is to be returned. |
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the specified object. |
Implements
IEqualityComparer