Summary
Throws an
InvalidOperationException if argument is
less thanDateTime.Today.
- Namespace
- oehen
.arguard - Containing Type
- Argument
Date Time Today Guard
Syntax
public static DateTime ThrowIfIsLessThanToday(this DateTime argument, string nameOfArgument)
Examples
Throws when argument is less than DateTime.Today.
var localVar = argument.ThrowIfLessThanToday(nameof(argument));
Parameters
| Name | Type | Description |
|---|---|---|
| argument | DateTime | Argument value. |
| nameOfArgument | string | Name of the argument. |
Return Value
| Type | Description |
|---|---|
| DateTime |