小编Rus*_*dge的帖子

c#string如何评估自己的值?

为什么这段代码

string str = 30 + 20 + 10 + "ddd";
Console.WriteLine(str);
Run Code Online (Sandbox Code Playgroud)

生产60ddd,

还有这个

string str = "ddd" + 30 + 20 + 10;
Console.WriteLine(str);
Run Code Online (Sandbox Code Playgroud)

生产ddd302010

看起来很简单,但我无法理解它.请告诉我可以去的方向,以便找到详细的答案.

谢谢!

.net c# expression operator-precedence

7
推荐指数
1
解决办法
166
查看次数

标签 统计

.net ×1

c# ×1

expression ×1

operator-precedence ×1