Table of Contents

Class ComparableExtensions

Namespace
MADE.Data.Validation.Extensions
Assembly
MADE.Data.Validation.dll

Defines a collection of extensions for IComparable objects.

public static class ComparableExtensions
Inheritance
ComparableExtensions
Inherited Members

Methods

IsGreaterThanOrEqualTo<T>(T, T)

Determines whether the value is greater than or equal to the other value.

public static bool IsGreaterThanOrEqualTo<T>(this T value, T other) where T : IComparable

Parameters

value T

The value to compare.

other T

The value to compare against.

Returns

bool

True if the value is greater than or equal to the other value.

Type Parameters

T

The IComparable type.

IsGreaterThan<T>(T, T)

Determines whether the value is greater than the other value.

public static bool IsGreaterThan<T>(this T value, T other) where T : IComparable

Parameters

value T

The value to compare.

other T

The value to compare against.

Returns

bool

True if the value is greater than the other value.

Type Parameters

T

The IComparable type.

IsLessThanOrEqualTo<T>(T, T)

Determines whether the value is less than or equal to the other value.

public static bool IsLessThanOrEqualTo<T>(this T value, T other) where T : IComparable

Parameters

value T

The value to compare.

other T

The value to compare against.

Returns

bool

True if the value is less than or equal to the other value.

Type Parameters

T

The IComparable type.

IsLessThan<T>(T, T)

Determines whether the value is less than the other value.

public static bool IsLessThan<T>(this T value, T other) where T : IComparable

Parameters

value T

The value to compare.

other T

The value to compare against.

Returns

bool

True if the value is less than the other value.

Type Parameters

T

The IComparable type.