Table of Contents

Class Range

Namespace
NDepend.Helpers
Assembly
NDepend.API.dll

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

min int

The lower bound of the range.

max int

The upper bound of the range.

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

Define a closed range in one and int.MaxValue.

public static readonly Range OneOrMore

Field Value

Range

Methods (16)

Contains(short)

Returns true if value is in this closed range.

public bool Contains(short value)

Parameters

value short

The nullable value to test.

Returns

bool

Contains(int)

Returns true if value is in this closed range.

public bool Contains(int value)

Parameters

value int

The nullable value to test.

Returns

bool

Contains(short?)

Returns true if value is not null and is in this closed range.

public bool Contains(short? value)

Parameters

value short?

The nullable value to test.

Returns

bool

Contains(int?)

Returns true if value is not null and is in this closed range.

public bool Contains(int? value)

Parameters

value int?

The nullable value to test.

Returns

bool

Contains(ushort?)

Returns true if value is not null and is in this closed range.

public bool Contains(ushort? value)

Parameters

value ushort?

The nullable value to test.

Returns

bool

Contains(uint?)

Returns true if value is not null and is in this closed range.

public bool Contains(uint? value)

Parameters

value uint?

The nullable value to test.

Returns

bool

Contains(ushort)

Returns true if value is in this closed range.

public bool Contains(ushort value)

Parameters

value ushort

The nullable value to test.

Returns

bool

Contains(uint)

Returns true if value is in this closed range.

public bool Contains(uint value)

Parameters

value uint

The nullable value to test.

Returns

bool

ContainsAny(params short[])

Returns true if any of the value in values is in this closed range.

public bool ContainsAny(params short[] values)

Parameters

values short[]

The values to test.

Returns

bool

ContainsAny(params int[])

Returns true if any of the value in values is in this closed range.

public bool ContainsAny(params int[] values)

Parameters

values int[]

The values to test.

Returns

bool

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

values short?[]

The nullable values to test.

Returns

bool

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

values int?[]

The nullable values to test.

Returns

bool

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

values ushort?[]

The nullable values to test.

Returns

bool

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

values uint?[]

The nullable values to test.

Returns

bool

ContainsAny(params ushort[])

Returns true if any of the value in values is in this closed range.

public bool ContainsAny(params ushort[] values)

Parameters

values ushort[]

The values to test.

Returns

bool

ContainsAny(params uint[])

Returns true if any of the value in values is in this closed range.

public bool ContainsAny(params uint[] values)

Parameters

values uint[]

The values to test.

Returns

bool