INumberBase<TSelf>.TryConvertFromChecked<TOther> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Tente de convertir une valeur en instance du type actuel, en lève une exception de dépassement de capacité pour 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 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 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.
Exceptions
value n’est pas représenté par TSelf.