CheckedCast()

System::CheckedCast(TFrom) function

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)

Template parameters

ParameterDescription
TToThe type to which the specified value is to be cast
TFromThe type of the specified value

Arguments

ParameterTypeDescription
valueTFromThe value to cast

Return Value

The value of type TTo equivalent to value

See Also