除了用于指定表达式中的运算顺序外,圆括号还用于指定强制转换或类型转换:

 CopyCode image复制代码
double x = 1234.7;
int a;
a = (int)x; // cast double to int

Expand 图像备注

Expand 图像C# 语言规范

Expand image请参见