N
Nicholas Paldino [.NET/C# MVP]
Cooly,
In order to do that, you would get a reference to the delegate list,
check for null, and then call. For example, say you had an event defined
like this:
public event EventHandler MyEvent;
In your code, you would do this:
// Assign MyEvent to a temp event handler.
EventHandler eventHandlers = MyEvent;
// Check for null.
if (eventHandlers != null)
// Fire the event.
eventHandlers(this, EventArgs.Empty);
Hope this helps.
In order to do that, you would get a reference to the delegate list,
check for null, and then call. For example, say you had an event defined
like this:
public event EventHandler MyEvent;
In your code, you would do this:
// Assign MyEvent to a temp event handler.
EventHandler eventHandlers = MyEvent;
// Check for null.
if (eventHandlers != null)
// Fire the event.
eventHandlers(this, EventArgs.Empty);
Hope this helps.