RangeSyntax<T> Class

Represents a range expression that can evaluate whether a value falls within the range.

public abstract class RangeSyntax<T>

Type parameters

T
The type of values in the range.

Methods

NameDescription
IsInRange(T)Determines whether a value is within the range using the default comparer.
IsInRange(T, IComparer<T>?)Determines whether a value is within the range using a custom comparer.

IsInRange overloads

IsInRange(T)

RangeSyntax`1.cs

Determines whether a value is within the range using the default comparer.

public bool IsInRange(T value)
Parameters
value T
The value to check.
Returns

bool true if the value is within the range; otherwise, false.

IsInRange(T, IComparer<T>?)

Determines whether a value is within the range using a custom comparer.

public abstract bool IsInRange(T value, IComparer<T>? comparer)
Parameters
value T
The value to check.
comparer IComparer<T>?
The comparer to use for comparison, or null to use the default comparer.
Returns

bool true if the value is within the range; otherwise, false.