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