Method ThrowIfOutOfRange
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
ThrowIfOutOfRange(int, int, int, string)
Throws an ArgumentOutOfRangeException if the integer is out of range.
public static void ThrowIfOutOfRange(this int argument, int minInclusive, int maxExclusive, string argName)
Parameters
argumentintThe integer to check.
minInclusiveintThe minimum value of the range, included.
maxExclusiveintThe maximum value of the range, not included.
argNamestringThe name of the argument.
Exceptions
- ArgumentOutOfRangeException
argumentis less thanminInclusiveor greater than or equal tomaxExclusive.