ArgumentLongLessThanGuard.

ThrowIfIsLessOrEqualThanZero(long, string) Method

Summary

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

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
GitHub