ArgumentDecimalLessThanGuard.

ThrowIfIsLessOrEqualThanZero(decimal, string) Method

Summary

Throws an System.ArgumentOutOfRangeException exception if the argument is less or equal than 0.

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
GitHub