INumberBase<TSelf>.CreateTruncating<TOther>(TOther) 方法

定義

從值建立目前型別的實例,截斷落在目前類型可表示範圍以外的任何值。

public:
generic <typename TOther>
 where TOther : System::Numerics::INumberBase<TOther> static override TSelf CreateTruncating(TOther value);
public static virtual TSelf CreateTruncating<TOther> (TOther value) where TOther : System.Numerics.INumberBase<TOther>;
static member CreateTruncating : 'Other -> 'Self (requires 'Other :> System.Numerics.INumberBase<'Other>)
Public Shared Overrides Function CreateTruncating(Of TOther As INumberBase(Of TOther)) (value As TOther) As TSelf

類型參數

TOther

value 的類型。

參數

value
TOther

用來建立 實例的值 TSelf

傳回

TSelf

value建立的 TSelf 實體,如果 value 落在 可表示的範圍TSelf之外,則會截斷 。

例外狀況

不支援 TOther

適用於