expected } for some reason
<p>The following code is giving me these errors,</p>

<p>} expected</p>

<p>Type or namespace definition, or end-of-file expected</p>

<pre><code>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)
            {

            }

        }


    }
}
</code></pre>

<p>How do I fix this?</p>
