.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top