摘要:
用于兼容类型之间的转换,类似于强制类型转换,但是比较安全,如果转换不了,不会抛出异常,返回false,经常写法如下:expression as type等效于以下语句:expression is type ? (type)expression : (type)null例如:Student a= b as student;且其执行效率高于is运算符。详细点击查看 阅读全文
posted @ 2012-03-05 09:26
竹木人
阅读(510)
评论(0)
推荐(0)

浙公网安备 33010602011771号