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