Click or drag to resize

GuardIsInRangeT Method

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

Checks if the value falls within min and max inclusive

Namespace:  CSInfrastructure.CodeContracts
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static T IsInRange<T>(
	T value,
	T min,
	T max,
	string paramName
)
where T : Object, IComparable<T>

Parameters

value
Type: T
The value being checked
min
Type: T
The minimum value (inclusive)
max
Type: T
The maximum value (inclusive)
paramName
Type: SystemString
The name of the parameter being checked

Type Parameters

T
The type of the value being checked

Return Value

Type: T
The value that was checked
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThrown when value does not fall within min and max
See Also