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 ExInt128 CreateChecked<TOther>(TOther value) where TOther : INumberBase<TOther>
Parameters
valueTOtherThe value that's used to create the instance of
TSelf.
Returns
- ExInt128
An instance of
TSelfcreated fromvalue.
Type Parameters
TOtherThe type of
value.
Exceptions
- NotSupportedException
TOtheris not supported.- OverflowException
valueis not representable byTSelf.