語言

UIntPtr.INumberBase<UIntPtr>.TryConvertToTruncating<TOther> 方法

定義

嘗試將目前類型的實例轉換成另一個類型,截斷落在目前類型可表示範圍以外的任何值。

generic <typename TOther>
 where TOther : System::Numerics::INumberBase<TOther> static bool System.Numerics.INumberBase<nuint>.TryConvertToTruncating(UIntPtr value, [Runtime::InteropServices::Out] TOther % result) = System::Numerics::INumberBase<UIntPtr>::TryConvertToTruncating;
static bool INumberBase<UIntPtr>.TryConvertToTruncating<TOther>(UIntPtr value, out TOther result) where TOther : System.Numerics.INumberBase<TOther>;
static member System.Numerics.INumberBase<nuint>.TryConvertToTruncating : unativeint * 'Other -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
 Shared Function TryConvertToTruncating(Of TOther As INumberBase(Of TOther)) (value As UIntPtr, ByRef result As TOther) As Boolean Implements INumberBase(Of UIntPtr).TryConvertToTruncating

類型參數

TOther

應該轉換成 value 的類型。

參數

value
UIntPtr

unativeint

用來建立 的 TOther值。

result
TOther

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

傳回

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

實作

適用於