5楼的朋友,我一开始就是这样写的,但是提示 button2_click 方法没有采用 0 个参数的重载,怎么解决?
我的代码是:
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show("hello!");
}
private void button1_Click(object sender, EventArgs e)
{
button2_Click();
}
}
}