INumberBase<TSelf>.TryConvertFromChecked<TOther> Méthode

Définition

Tente de convertir une valeur en instance du type actuel, lève une exception de dépassement de capacité pour toutes les valeurs qui se trouvent en dehors de la plage représentable du type actuel.

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

Paramètres de type

TOther

Type d'élément value.

Paramètres

value
TOther

Valeur utilisée pour créer le instance de TSelf.

result
TSelf

Lorsque cette méthode est retournée, contient un instance de TSelf converti à partir de value.

Retours

false si TOther n’est pas pris en charge ; sinon, true.

Exceptions

value n’est pas représentable par TSelf.

S’applique à