A rather simple question (I think), but I don\'t seem to see an answer already. I know that some values are passed via value (like int and long), and others are passed by refer
In the standard event pattern there are two references passed in:
void FormClosing(object sender, FormClosingEventArgs e) { ... }
those two references are passed 'by value', using for example sender = null
will have no effect outside the handling method.
But you can easily pass a value back:
void FormClosing(object sender, FormClosingEventArgs e)
{
...
e.Cancel = true; // this will pass back to the caller
}