以下代码给了我这些错误,
} 预期的
类型或命名空间定义,或预期的文件结尾
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Derpy merp = new Derpy();
merp.OnDerp += new EventHandler(herp);
void herp(object sender, EventArgs e)
{
}
}
}
}
我该如何解决?