开发者

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

开发者 https://www.devze.com 2023-01-20 05:38 出处:网络
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 ca

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

精彩评论

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