If I have an event whose handler returns a bool, what happens if I attach multiple events??
see this example
public class MyClass
{
public delegate bool MyEventHandler(object sender, EventArgs e);
public event MyEventHandler Submit;
public void DoSubmissions()
{
if (Submit != null && Submit(this, null))
{
Console.Write("HOORAY");
}
}
}
so in my example, the handler returns true on a successful submission. but i assign two handlers to the event...what happens? the first handler's return is used? the 2nd? neither? both?