Both ‘is’ and ‘as’ operators are used for type casting. But there are significant differences in these keywords
The Is operator is used to check the type during runtime. It is a boolean operator and returns true if the given object is of the same type .
The Is operator will return False if the given object is not same type.
The As operator will do explicit cast and will assign null if type cast is unsuccessful.
With the examples above we can see that the is operator is used for boxing and unboxing conversions whereas as operator is used for nullable, reference and boxing conversions.
I hope you had something useful to learn, please leave your comments below.