INumberBase<TSelf>.TryConvertFromChecked<TOther> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試將值轉換成目前型態的實例,對於超出目前型別可表示範圍的值,拋出溢位例外。
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
類型參數
- TOther
value 的類型。
參數
- value
- TOther
用來建立 的 TSelf值。
- result
- TSelf
當此方法回傳時,包含一個從 轉換而來TSelf的實例value。
傳回
false若TOther不支持;否則,。 true
例外狀況
value 無法由 TSelf表示。