ArgumentLongLessThanGuard.

ThrowIfIsLessThanZero(long, string) Method

Summary

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

Syntax

public static long ThrowIfIsLessThanZero(this long argument, string nameOfArgument)

Examples

Throws when the long argument `longArgument` is less than 0.

var localVar = longArgument.ThrowIfIsLessThanZero(nameof(longArgument));

Parameters

Name Type Description
argument long Argument value.
nameOfArgument string Name of the argument.

Return Value

Type Description
long
GitHub