System::CheckedCast method

System::CheckedCast method

Determines if the specified value falls into the range of values of type TTo and if it does casts it to the type TTo.

template<typename TTo,typename TFrom> TTo System::CheckedCast(TFrom value)
ParameterDescription
TToThe type to which the specified value is to be cast
TFromThe type of the specified value
ParameterTypeDescription
valueTFromThe value to cast

ReturnValue

The value of type TTo equivalent to value

See Also