ArgumentLongLessThanGuard.

ThrowIfIsLessOrEqualThan(long, long, string) Method

Summary

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

Syntax

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

Examples

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

var localVar = longArgument.ThrowIfIsLessOrEqualThan(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