Class Range
This class define a numerical closed range. It is useful to make some code queries generated easier to read.
public sealed class Range
- Inheritance
-
Range
- Inherited Members
- Extension Methods
Remarks
The range is closed in the sense that lower and upper numeric bounds are considered in the range.
Constructor (1)
Range(int, int)
Create a new range.
public Range(int min, int max)
Parameters
Remarks
min and max can be equal to test equality to a number.
If min is greater than max, the value are swapped.
Field (1)
OneOrMore
public static readonly Range OneOrMore
Field Value
Methods (16)
Contains(short)
Returns true if value is in this closed range.
public bool Contains(short value)
Parameters
valueshortThe nullable value to test.
Returns
Contains(int)
Returns true if value is in this closed range.
public bool Contains(int value)
Parameters
valueintThe nullable value to test.
Returns
Contains(short?)
Returns true if value is not null and is in this closed range.
public bool Contains(short? value)
Parameters
valueshort?The nullable value to test.
Returns
Contains(int?)
Returns true if value is not null and is in this closed range.
public bool Contains(int? value)
Parameters
valueint?The nullable value to test.
Returns
Contains(ushort?)
Returns true if value is not null and is in this closed range.
public bool Contains(ushort? value)
Parameters
valueushort?The nullable value to test.
Returns
Contains(uint?)
Returns true if value is not null and is in this closed range.
public bool Contains(uint? value)
Parameters
valueuint?The nullable value to test.
Returns
Contains(ushort)
Returns true if value is in this closed range.
public bool Contains(ushort value)
Parameters
valueushortThe nullable value to test.
Returns
Contains(uint)
Returns true if value is in this closed range.
public bool Contains(uint value)
Parameters
valueuintThe nullable value to test.
Returns
ContainsAny(params short[])
Returns true if any of the value in values is in this closed range.
public bool ContainsAny(params short[] values)
Parameters
valuesshort[]The values to test.
Returns
ContainsAny(params int[])
Returns true if any of the value in values is in this closed range.
public bool ContainsAny(params int[] values)
Parameters
valuesint[]The values to test.
Returns
ContainsAny(params short?[])
Returns true if any of the non-null value in values is in this closed range.
public bool ContainsAny(params short?[] values)
Parameters
valuesshort?[]The nullable values to test.
Returns
ContainsAny(params int?[])
Returns true if any of the non-null value in values is in this closed range.
public bool ContainsAny(params int?[] values)
Parameters
valuesint?[]The nullable values to test.
Returns
ContainsAny(params ushort?[])
Returns true if any of the non-null value in values is in this closed range.
public bool ContainsAny(params ushort?[] values)
Parameters
valuesushort?[]The nullable values to test.
Returns
ContainsAny(params uint?[])
Returns true if any of the non-null value in values is in this closed range.
public bool ContainsAny(params uint?[] values)
Parameters
valuesuint?[]The nullable values to test.
Returns
ContainsAny(params ushort[])
Returns true if any of the value in values is in this closed range.
public bool ContainsAny(params ushort[] values)
Parameters
valuesushort[]The values to test.
Returns
ContainsAny(params uint[])
Returns true if any of the value in values is in this closed range.
public bool ContainsAny(params uint[] values)
Parameters
valuesuint[]The values to test.