UIntPtr.CreateTruncating<TOther>(TOther) 方法

定义

从值创建当前类型的实例,截断属于当前类型的可表示范围之外的任何值。

public static UIntPtr CreateTruncating<TOther>(TOther value) where TOther : System.Numerics.INumberBase<TOther>;

类型参数

TOther

value的类型。

参数

value
TOther

用于创建 TSelf实例的值。

返回

UIntPtr

value创建的 TSelf 实例,如果 value 超出可表示的 TSelf范围,则截断。

实现

适用于

产品 版本
.NET 7, 8, 9, 10