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

當這個方法傳回時,包含從 value轉換的 TSelf 實例。

傳回

false 如果 TOther 不支援 ,則為 ,否則為 true

適用於