Class BoxedNumberComparer
public class BoxedNumberComparer : IComparer<object?>, IEqualityComparer<object?>
- Inheritance
-
BoxedNumberComparer
- Implements
- Inherited Members
Constructors
BoxedNumberComparer(ComparisonOptions, MathHelperOptions)
public BoxedNumberComparer(ComparisonOptions comparisonOptions, MathHelperOptions mathHelperOptions)
Parameters
comparisonOptionsComparisonOptionsmathHelperOptionsMathHelperOptions
Methods
Compare(object?, object?)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(object? x, object? y)
Parameters
Returns
- int
A signed integer that indicates the relative values of
xandy, as shown in the following table.Value Meaning Less than zero xis less thany.Zero xequalsy.Greater than zero xis greater thany.
Equals(object?, object?)
Determines whether the specified objects are equal.
public bool Equals(object? x, object? y)
Parameters
Returns
GetHashCode(object?)
Returns a hash code for the specified object.
public int GetHashCode(object? obj)
Parameters
Returns
- int
A hash code for the specified object.
Exceptions
- ArgumentNullException
The type of
objis a reference type andobjis null.