Summary
Throws an
System.ArgumentOutOfRangeException
exception if the argument is less or equal
than compareValue.
- Namespace
- oehen
.arguard .LessThan - Containing Type
- Argument
Long Less Than Guard
Syntax
public static long ThrowIfIsLessOrEqualThan(this long argument, long compareValue, string nameOfArgument)
Examples
Throws when the long argument `longArgument` value is less or equal than 5.
var localVar = longArgument.ThrowIfIsLessOrEqualThan(nameof(longArgument), 5);
Parameters
Name | Type | Description |
---|---|---|
argument | long | Argument value. |
compareValue | long | Value to compare. |
nameOfArgument | string | Name of the argument. |
Return Value
Type | Description |
---|---|
long |