INumberBase<TSelf>.TryConvertToTruncating<TOther> Metod

Definition

Försöker konvertera en instans av den aktuella typen till en annan typ och trunkerar alla värden som ligger utanför det representerarbara intervallet för den aktuella typen.

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

Typparametrar

TOther

Den typ som value ska konverteras.

Parametrar

value
TSelf

Värdet som används för att skapa instansen av TOther.

result
TOther

När den här metoden returnerar innehåller en instans av TOther konverterad från value.

Returer

false om TOther inte stöds, annars true.

Gäller för