全局 int count = 0;
private void button1_Click(object sender, EventArgs e)
        {
            this.label1.Text = "发生";
            count++;
输出        }这样不行吗?
你的那个count()什么时候用了?

解决方案 »

  1.   

    为什么在Form1里还有Form1对象呢?
            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++;        }
      

  2.   

    在button的click事件里加一个计数器,在事件中调用Count()
      

  3.   

    private int i=0;
            public Form1()
            {
                InitializeComponent();
            } private void button1_Click(object sender, EventArgs e)
            {
    this.label1.Text = "sss";
                i++;
                label2.Text = i.ToString();
            }
      

  4.   

    可以直接在Button Click事件里面处理!