INumberBase<TSelf>.CreateSaturating<TOther>(TOther) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从值创建当前类型的实例,使当前类型的可表示范围之外的任何值饱和。
public:
generic <typename TOther>
where TOther : System::Numerics::INumberBase<TOther> static override TSelf CreateSaturating(TOther value);
public static virtual TSelf CreateSaturating<TOther>(TOther value) where TOther : System.Numerics.INumberBase<TOther>;
static member CreateSaturating : 'Other -> 'Self (requires 'Other :> System.Numerics.INumberBase<'Other>)
Public Shared Overrides Function CreateSaturating(Of TOther As INumberBase(Of TOther)) (value As TOther) As TSelf
类型参数
- TOther
value 的类型。
参数
- value
- TOther
用于创建 实例的值 TSelf。
返回
TSelf
从 value创建的 实例TSelf,如果value超出 的可表示范围TSelf,则饱和。
例外
不支持 TOther。