Possible Duplicate:
Direct casting vs 'as' operator?
The as operator is similar to a cast. But i want to know the difference? And also i`ve doubt it is operator or keyword? :)
Possible Duplicate:
Direct casting vs 'as' operator?
The as operator is similar to a cast. But i want to know the difference? And also i`ve doubt it is operator or keyword? :)
The as operator is the same as cast operator except that it yields null on conversion failure instead of throwing an exception
Both are used for casting, however AS will return a null if there is a cast mismatch where as the latter throws an exception. AS is an operator.