語言

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

定義

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

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

類型參數

TOther

應該轉換成 value 的類型。

參數

value
Byte

用來建立 的 TOther值。

result
TOther

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

傳回

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

實作

適用於