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.
精彩评论