how to make a method wait for an event? when the function is called, it will wait for an event to occur to continue execution. is that possible?
serkan sendur
821
Postaholic
Banned
Recommended Answers
Jump to PostThat is the default behavior. Here is a test class:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace daniweb { public delegate void OnSerkanEvent(object sender, SerkanEventArgs e); public class Serkan { public event OnSerkanEvent OnEvent; public Serkan() { } public void DoWork() { if (this.OnEvent != …
All 2 Replies
sknake
1,622
Senior Poster
Featured Poster
ddanbe
commented:
Nice post! And very instructive.
+8
serkan sendur
821
Postaholic
Banned
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.