Table of Contents

Class EnumerationComparer

Namespace
KYS.EFCore.Library
Assembly
KYS.EFCore.Library.dll

Equality comparer that compares Enumeration values by Id.

public sealed class EnumerationComparer : EqualityComparer<Enumeration>, IEqualityComparer<Enumeration>, IEqualityComparer
Inheritance
EnumerationComparer
Implements
Inherited Members

Methods

Equals(Enumeration, Enumeration)

Determines whether two values have the same Id.

public override bool Equals(Enumeration x, Enumeration y)

Parameters

x Enumeration

The first value to compare.

y Enumeration

The second value to compare.

Returns

bool

true if the values are equal; otherwise false.

GetHashCode(Enumeration)

Returns a hash code based on Id.

public override int GetHashCode(Enumeration obj)

Parameters

obj Enumeration

The value for which to get a hash code.

Returns

int

A hash code for obj.