If we call Delegate.Invoke () then the handler will get called synchronously. Means till the handler function is completed the control will not return back.
Code:
delegate void Foo(); Foo evtFoo; evtFoo.Invoke(); //This will not return until the associated handler function is completed
Code:
evtFoo.BeginInvoke(MyCallback, null);
Code:
void MyCallback(IAsynResult ar);
Leave a comment: