Partager via


Assumes.NotNull Method

Definition

Overloads

NotNull<T>(Nullable<T>)

Throws Microsoft.Assumes.InternalErrorException if the specified value is null.

NotNull<T>(T)

Throws Microsoft.Assumes.InternalErrorException if the specified value is null.

NotNull<T>(Nullable<T>)

Throws Microsoft.Assumes.InternalErrorException if the specified value is null.

public:
generic <typename T>
 where T : value class static void NotNull(Nullable<T> value);
[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static void NotNull<T> (T? value) where T : struct;
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")>]
static member NotNull : Nullable<'T (requires 'T : struct)> -> unit (requires 'T : struct)
Public Shared Sub NotNull(Of T As Structure) (value As Nullable(Of T))

Type Parameters

T

The type of value to test.

Parameters

value
Nullable<T>
Attributes

Applies to

NotNull<T>(T)

Throws Microsoft.Assumes.InternalErrorException if the specified value is null.

public:
generic <typename T>
 where T : class static void NotNull(T value);
[System.Diagnostics.DebuggerStepThrough]
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
public static void NotNull<T> (T? value) where T : class;
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")>]
static member NotNull : 'T -> unit (requires 'T : null)
Public Shared Sub NotNull(Of T As Class) (value As T)

Type Parameters

T

The type of value to test.

Parameters

value
T
Attributes

Applies to