Question about program flow and event handlers

Posted on 2009-04-16
Medium Priority
Last Modified: 2012-05-06

Lets say I have a method that raises an event by called the INvoke method of a delegate. Lets say the method looks like this psuedocode

Sub OnEvent()
 Statement a
 Statement b

When the Invoke method is called does program control pass to the invoke method or does the invoke method go off and run in a separate thread. I think I remember reading that program control passes to the invoke method and then control returns to the OnEvent method after the invoke method has finished. Is this correct? I also think I remember reading that if multiple event handler methods are stored in the delegate you can't guarantee anything about the order in which they are executed.

Question by:andieje
  • 2

Accepted Solution

newbieal earned 1500 total points
ID: 24164283

Author Comment

ID: 24171253
thanks for posting but those links don't provide answers to the questions i asked

Expert Comment

ID: 24177192
If you read through the information in the link it will answer your question, such as the fact that you are correct about your assumption regarding delegate function execution and the order of it in the context of the function.  It also talks about storing several in a delegate group, etc.

Please read through the info and then let me know if you still have questions and what exactly you need clarification on.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question