Box<T>.TryGetFrom(Object, Box<T>) Method

Definition

Tries to get a Box<T> reference from an input Object representing a boxed T value.

public static bool TryGetFrom (object obj, out Microsoft.Toolkit.HighPerformance.Box<T>? box);
static member TryGetFrom : obj * Box -> bool
Public Shared Function TryGetFrom (obj As Object, ByRef box As Box(Of T)) As Boolean

Parameters

obj
Object

The input Object instance to check.

box
Box<T>

The resulting Box<T> reference, if obj was a boxed T value.

Returns

true if a Box<T> instance was retrieved correctly, false otherwise.

Applies to