The biggest difference between as and cast is how to handle user-defined transformations. The operator as and is only checks the Run-time type of the object being converted, and does not perform other operations. If the run-time type of the converted object is neither the converted target type nor its derived type, then the transition will fail. But a forced transition uses the conversion operator to perform transformational operations, including any built-in numeric conversions (such as a long int).
In general, we should consider using as as a type conversion, and then consider using is, and finally consider using a cast.
If you use the as to transform data, it is not necessary to use is for testing. Just check that the return type is null.
Is and as as, are type conversions safe, they do not at any time in the conversion of the exception, so you can use is to safely determine the data type. When it is different from as as, the is just does type detection and returns logical values without conversion.
As cannot be used for value types, because value types cannot be null. In this case we should use coercion type conversion.
Eg: in the code
Double i =;
Int j = i as int;
Error 1 The AS operator must be used with a reference type or nullable type (' int ' is a non-nullable value type)
This paper url:http://www.bianceng.cn/programming/csharp/201410/45592.htm