Int32.INumberBase<Int32>.TryConvertToTruncating<TOther> 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试将当前类型的实例转换为另一种类型,截断当前类型可表示范围之外的任何值。
generic <typename TOther>
where TOther : System::Numerics::INumberBase<TOther> static bool System.Numerics.INumberBase<System.Int32>.TryConvertToTruncating(int value, [Runtime::InteropServices::Out] TOther % result) = System::Numerics::INumberBase<int>::TryConvertToTruncating;
C#
static bool INumberBase<int>.TryConvertToTruncating<TOther>(int value, out TOther result) where TOther : System.Numerics.INumberBase<TOther>;
static member System.Numerics.INumberBase<System.Int32>.TryConvertToTruncating : int * 'Other -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
Shared Function TryConvertToTruncating(Of TOther As INumberBase(Of TOther)) (value As Integer, ByRef result As TOther) As Boolean Implements INumberBase(Of Integer).TryConvertToTruncating
- TOther
应转换为的类型 value
。
- value
- Int32
用于创建 实例的值 TOther
。
- result
- TOther
此方法返回时,包含从 value
转换的 实例TOther
。
false
如果 TOther
不支持,则为 ;否则为 true
。
产品 | 版本 |
---|---|
.NET | 7, 8, 9, 10 |