INumberBase<TSelf>.TryConvertFromTruncating<TOther> Metoda

Definicja

Próbuje przekonwertować wartość na wystąpienie bieżącego typu, obcinając wszystkie wartości, które wykraczają poza dopuszczalny zakres bieżącego typu.

protected:
generic <typename TOther>
 where TOther : System::Numerics::INumberBase<TOther> static bool TryConvertFromTruncating(TOther value, [Runtime::InteropServices::Out] TSelf % result);
protected static abstract bool TryConvertFromTruncating<TOther> (TOther value, out TSelf result) where TOther : System.Numerics.INumberBase<TOther>;
static member TryConvertFromTruncating : 'Other * 'Self -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
Protected Shared Function TryConvertFromTruncating(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żywana 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.

Dotyczy