Click or drag to resize

ArgumentGuardInRangeT Method

Throws if ordinary value is out of bounds.

Namespace:  KSPDev.ProcessingUtils
Assembly:  KSPDev_Utils.1.2 (in KSPDev_Utils.1.2.dll) Version: 1.2 for KSP v1.6+
Syntax
C#
public static void InRange<T>(
	T arg,
	string argName,
	T minValue,
	T maxValue,
	string message = null,
	Object context = null
)
where T : IComparable
Request Example View Source

Parameters

arg
Type: T
The argument value to check.
argName
Type: SystemString
The argument name.
minValue
Type: T
The minumum allowed value.
maxValue
Type: T
The maximum allowed value.
message (Optional)
Type: SystemString
An optional message to present in the error.
context (Optional)
Type: SystemObject
The optional "owner" object.

Type Parameters

T
Type of value to check.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionIf the argument is an empty string.
See Also