static classes and events

  • Thread starter Thread starter Michael Maercker
  • Start date Start date
M

Michael Maercker

Hi!

I'm designing several different user controls in c#.net where each instance
is supposed to react to the fired events of one "data manager class". How
can I (at design-time) tell all the controls (set a DataManager-property) to
react to the same DataManager-instance?

I hope my question isn't too short-phrased; I'm rather new into c# (coming
from vb6) and it's ought to be a real basic problem.

Thanks in advance,
Mike
 
Michael,

Why not pass a reference to the data manger to the controls themselves?
You definitely could have a static event, but that would limit you to one
datamanager, always.

If your design will withstand this, and never change, then I say that
this is fine. However, if you can see the need to have individual data
managers, then I would pass around the data manager.

Hope this helps.
 
Back
Top