Summary
Throws an
ArgumentException if argument is true.
- Namespace
- oehen
.arguard - Containing Type
- ArgumentBooleanGuard
Syntax
public static void ThrowIfTrue(this bool argument, string nameOfArgument)
Examples
Throws when the argument `argument` is true.
argument.ThrowIfTrue(nameof(argument));
Parameters
| Name | Type | Description |
|---|---|---|
| argument | bool | Argument value. |
| nameOfArgument | string | Name of the argument. |
Return Value
| Type | Description |
|---|---|
| void |