When to use the "as" keyword and when to use () casting?

Possible Duplicate:
Direct casting vs 'as' operator?

as doesn't throw an exception, but wouldn't it result in a NullPointerException later? doesn't it make it harder to debug?


在使用as之后,您应该始终检查null。

链接地址: http://www.djcxy.com/p/73744.html

上一篇: 在下面的代码中使用Cast和AS运算符之间的区别?

下一篇: 何时使用“as”关键字以及何时使用()铸造?