Modifier

Partager via


ObjectMarshal.DangerousUnbox<T>(Object) Method

Definition

Unboxes a T value from an input Object instance.

public static ref T DangerousUnbox<T> (object obj) where T : struct;
static member DangerousUnbox : obj -> 'T (requires 'T : struct)
Public Function DangerousUnbox(Of T As Structure) (obj As Object) As T

Type Parameters

T

The type of value to unbox.

Parameters

obj
Object

The input Object instance, representing a boxed T value.

Returns

T

The T value boxed in obj.

Exceptions

Thrown when obj is not of type T.

Applies to