ArgumentOutOfRange(T) Method

Project Mercury API

[This is preliminary documentation and is subject to change.]

Performs a check against a method argument, and throws an ArgumentOutOfRangeException if it is greater than the specified maximum value, or less than the specified minimum value.

Namespace:  ProjectMercury
Assembly:  ProjectMercury (in ProjectMercury.dll) Version: 3.1.0.0

Syntax

C#
public static void ArgumentOutOfRange<T>(
	string parameter,
	T argument,
	T min,
	T max
)
where T : IComparable<T>
Visual Basic (Declaration)
Public Shared Sub ArgumentOutOfRange(Of T As IComparable(Of T)) ( _
	parameter As String, _
	argument As T, _
	min As T, _
	max As T _
)
Visual C++
public:
generic<typename T>
where T : IComparable<T>
static void ArgumentOutOfRange(
	String^ parameter, 
	T argument, 
	T min, 
	T max
)

Parameters

parameter
Type: System..::.String
The name of the method parameter.
argument
Type: T
The value being passed as an argument.
min
Type: T
The minimum allowed value (inclusive).
max
Type: T
The maximum allowed value (inclusive).

Type Parameters

T
The type of argument being checked.

See Also