The as operator is similar to a cast operation; however, if the conversion is not possible, as returns null instead of raising an exception. More formally, an expression of the form,
is equivalent to,
expression is type ? (type)expression : (type)null
except that expression is evaluated only once.
Note that the as operator only performs reference conversions and boxing conversions. The as operator cannot perform other conversions, such as user-defined conversions, which should instead be performed using cast expressions.