Changes the data type of the result of an expression to a given nullable type.
expression As type
- An expression with a data type that can be changed.
- A data type.
You use the operator
As when you must change the data type of the result of an expression.
If the conversion is not possible, then the result is
This is different from the usual type-conversion expression, which can cause a run-time error.