Int16.INumberBase<Int16>.TryConvertToChecked<TOther> Metoda

Definicja

Próbuje przekonwertować wystąpienie bieżącego typu na inny typ, zgłaszając wyjątek przepełnienia dla wszystkich wartości, które wykraczają poza dopuszczalny zakres bieżącego typu.

generic <typename TOther>
 where TOther : System::Numerics::INumberBase<TOther> static bool System.Numerics.INumberBase<System.Int16>.TryConvertToChecked(short value, [Runtime::InteropServices::Out] TOther % result) = System::Numerics::INumberBase<short>::TryConvertToChecked;
static bool INumberBase<short>.TryConvertToChecked<TOther> (short value, out TOther result) where TOther : System.Numerics.INumberBase<TOther>;
static member System.Numerics.INumberBase<System.Int16>.TryConvertToChecked : int16 * 'Other -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
 Shared Function TryConvertToChecked(Of TOther As INumberBase(Of TOther)) (value As Short, ByRef result As TOther) As Boolean Implements INumberBase(Of Short).TryConvertToChecked

Parametry typu

TOther

Typ, do którego value ma zostać przekonwertowany.

Parametry

value
Int16

Wartość użyta do utworzenia wystąpienia klasy TOther.

result
TOther

Gdy ta metoda zwraca wartość , zawiera wystąpienie TOther przekonwertowane z valueklasy .

Zwraca

false jeśli TOther nie jest obsługiwany; w przeciwnym razie true.

Implementuje

Dotyczy