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