INumberBase<TSelf>.TryConvertFromChecked<TOther> Metoda

Definicja

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

protected:
generic <typename TOther>
 where TOther : System::Numerics::INumberBase<TOther> static bool TryConvertFromChecked(TOther value, [Runtime::InteropServices::Out] TSelf % result);
protected static abstract bool TryConvertFromChecked<TOther> (TOther value, out TSelf result) where TOther : System.Numerics.INumberBase<TOther>;
static member TryConvertFromChecked : 'Other * 'Self -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
Protected Shared Function TryConvertFromChecked(Of TOther As INumberBase(Of TOther)) (value As TOther, ByRef result As TSelf) As Boolean

Parametry typu

TOther

Typ .value

Parametry

value
TOther

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

result
TSelf

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

Zwraca

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

Wyjątki

value element nie jest reprezentowany przez element TSelf.

Dotyczy