将1的值保留在TextBox局部变量上:
private void button1_Clicked(object sender, EventArgs e)
{
string temporaryText = textbox1.Text;
textbox1.Text = textbox2.Text;
textbox2.Text = temporaryText;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
67 次 |
| 最近记录: |