.NET Events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Can someone please tell me how
events are handled in .NET?
What I mean is when I fire an
event in the method

OnFireEvent(EventArgs e)
{
if (MyEvent != null)
MyEvent(this, e);
 
When the event is raised, programmatic control is transferred to the event
handler. When the event handler code has been completed, programmatic
control is returned to the caller of the event.
 
The code is run on the same thread, it will block. If you wan't asynchronous
behaviour, look up BeginInvoke/EndInvoke.

Chris
 
Back
Top