程序运行在交换时不能显示,寻求语句问题
using System;using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 单分支结构
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
String x =textBox1.Text;
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
String y = textBox2.Text;
}
private void button1_Click(object sender, EventArgs e)
{
String z;
String x = textBox1.Text;
String y = textBox2.Text;
z = x;
x = y;
y = z;
this.listBox1.Text =x;
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}