Langue

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

Définition

Tente de convertir une valeur en instance du type actuel, en tronqué toutes les valeurs qui se trouvent en dehors de la plage représentée du type actuel.

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

Paramètres de type

TOther

Type de value.

Paramètres

value
TOther

Valeur utilisée pour créer l’instance de TSelf.

result
TSelf

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

Retours

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

S’applique à