If you mean you created your own event, and you want to know how you signal it to handlers then:
public event EventHandler MyEvent;
protected virtual void OnMyEvent(EventArgs e)
{
EventHandler eh = MyEvent;
if (eh != null)
{
eh(this, e);
}
}
Whenever you want to signal the end and have and connected handlers do somethign as a result, just call the OnMyEvent method with either an EventArgs instance, or
null
:
OnMyEvent(null);
If you are using events, it might be worth your looking at this:
A simple code snippet to add an event[
^] - it adds a snippet to Visual Studio which generates the above code for you when you type "evh" in the same way that "prop" generates an automatic property.
If that isn't what you want, what is?