开发者

Why is the c# casting syntax defined as (AnyType) obj rather than AnyType(obj)?

Why is the c# casting syntax defined as (AnyType) obj rather than Any开发者_JAVA百科Type(obj) ?


To keep syntax as C-like as practical, which has it this way to avoid confusing a cast with a function call.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜