Summary
Throws an
ArgumentOutOfRangeException exception if the argument is less than
compareValue.
- Namespace
- oehen
.arguard .LessThan - Containing Type
- Argument
Long Less Than Guard
Syntax
public static long ThrowIfIsLessThan(this long argument, long compareValue, string nameOfArgument)
Examples
Throws when the long argument `longArgument` is less than 5.
var localVar = longArgument.ThrowIfIsLessThan(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 |