Guard.IsNotDefault<T>(T, String) Method

Definition

Asserts that the input value is not default.

public static void IsNotDefault<T> (T value, string name) where T : struct;
static member IsNotDefault : 'T * string -> unit (requires 'T : struct)
Public Shared Sub IsNotDefault(Of T As Structure) (value As T, name As String)

Type Parameters

T

The type of struct value type being tested.

Parameters

value
T

The input value to test.

name
String

The name of the input parameter being tested.

Exceptions

Thrown if value is default.

Applies to