Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么区别:
this->textBox1->Text = this->textBox1->Text + ("2");
还有这个:
this->textBox1->Text = this->textBox1->Text + "2";
或者它只是一个语法糖?
那是完全相同的,因此就结果而言没有区别。编译器首先将评估括号中的内容,因为它只是(“2”),它将导致“2”,因此与您的第二个代码相同。