e.Cancel does not work
<p>I have VS 2010 and want to cancel the form closing event via a Yes|No|Cancel dialog, but when I put the e.Cancel in the event handler for the dialog box, I get an error that says "'System.EventArgs' does not contain a definition for 'Cancel' and no extension method 'Cancel' accepting a first argument of type 'System.EventArgs' could be found (are you missing a using directive or an assembly reference?)." Also the word "Cancel" has a red line under it. Everything I've read online says this is the only way to cancel a FormClosing event. I tested the code in VS2008 and it does the same thing.</p>

<p>The code for the event handler is below:</p>

<pre><code>private void displayMessageBox(object sender, EventArgs e)
        {
        DialogResult result = MessageBox.Show("Do you want to save the changes to the document before closing it?", "MyNotepad",MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
        if (result == DialogResult.Yes)
        {
            saveToolStripMenuItem_Click(sender, e);
        }
        else if (result == DialogResult.No)
        {
            rtbMain.Clear();
            this.Text = "Untitled - MyNotepad"; 
        }
        else if (result == DialogResult.Cancel)
        {
            // Leave the window open.
            e.Cancel() = true;


        }
</code></pre>

<p>Here are the usings (in the event it makes a difference):</p>

<pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
</code></pre>
