Method CreateChecked
- Namespace
- Zyl.VectorTraits.ExTypes
- Assembly
- VectorTraits.dll
CreateChecked<TOther>(TOther)
Creates an instance of the current type from a value, throwing an overflow exception for any values that fall outside the representable range of the current type.
public static ExUInt128 CreateChecked<TOther>(TOther value) where TOther : INumberBase<TOther>
Parameters
value
TOtherThe value that's used to create the instance of
TSelf
.
Returns
- ExUInt128
An instance of
TSelf
created fromvalue
.
Type Parameters
TOther
The type of
value
.
Exceptions
- NotSupportedException
TOther
is not supported.- OverflowException
value
is not representable byTSelf
.