全局 int count = 0;
private void button1_Click(object sender, EventArgs e)
{
this.label1.Text = "发生";
count++;
输出 }这样不行吗?
你的那个count()什么时候用了?
private void button1_Click(object sender, EventArgs e)
{
this.label1.Text = "发生";
count++;
输出 }这样不行吗?
你的那个count()什么时候用了?
Button bt;
int count = 0; public Form1()
{
InitializeComponent();
bt.Click += new EventHandler(button1_Click);
} private void button1_Click(object sender, EventArgs e)
{
this.label1.Text = "sss";
count++; }
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
this.label1.Text = "sss";
i++;
label2.Text = i.ToString();
}