ArgumentBooleanGuard.

ThrowIfFalse(bool, string) Method

Summary

Throws an System.ArgumentException if argument is false.
Namespace
oehen.arguard
Containing Type
ArgumentBooleanGuard

Syntax

public static void ThrowIfFalse(this bool argument, string nameOfArgument)

Examples

Throws when the argument `argument` is false.

argument.ThrowIfFalse(nameof(argument));

Parameters

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

Return Value

Type Description
void
GitHub