ArgumentLongLessThanGuard.

ThrowIfIsLessThan(long, long, string) Method

Summary

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

Syntax

public static long ThrowIfIsLessThan(this long argument, long compareValue, string nameOfArgument)

Examples

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

var localVar = longArgument.ThrowIfIsLessThan(nameof(longArgument), 5);

Parameters

Name Type Description
argument long Argument value.
compareValue long Value to compare.
nameOfArgument string Name of the argument.

Return Value

Type Description
long
GitHub