語言

INumberBase<TSelf>.TryConvertFromTruncating<TOther> 方法

定義

嘗試將值轉換為目前型別的實例,截斷落在當前型別可表示範圍內的值。

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

類型參數

TOther

value 的類型。

參數

value
TOther

用來建立 實 TSelf例的值。

result
TSelf

當此方法回傳時,包含一個從 轉換而來TSelf的實例value。

傳回

false若TOther不支持;否則,。 true

適用於