My application dynamically adds UserControls to it's client area.  The
UserControls fire events to update the container applications status bar.
As the UserControls are added to the container I do the following to hook
up the event:

Type type = Ctrl.GetType();
EventInfo ei = type.GetEvent("UpdateStatusBar");
if (null != ei)
{
   ei.AddEventHandler(Ctrl, StatusBarEventHandler);
}

static void StatusBarEventHandler(object sender, EventArgs)
{
   ...
}

When I try to build the code I get the following error:
"Method 'OMD.Core.OMDView.StatusBarEventHandler(object, System.EventArgs)'
referenced without parentheses"

Does anyone know what I'm doing wrong?

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to