Newbie: Create Events and EventHandlers
-
I'm a novice programmer. I am using Visual Studio.net 2003. I am wondering if there is a way to create an event that isn't bound to a GUI control. For example: Is it possible to create an event that fires when something is added to a hashtable; OR an event that fires when a Global variable is incremented. Any info, suggestions and especically simple code examples would be greatly appreciated. thanks, Jody Blau
-
I'm a novice programmer. I am using Visual Studio.net 2003. I am wondering if there is a way to create an event that isn't bound to a GUI control. For example: Is it possible to create an event that fires when something is added to a hashtable; OR an event that fires when a Global variable is incremented. Any info, suggestions and especically simple code examples would be greatly appreciated. thanks, Jody Blau
You can create an event where-ever you like, so long as the object defines the event, or you're writing or wrapping the object in order to cause it to fire. For example, if you write a class that encapsulates a hash table, you can define an event that your class will fire, but I don't believe that hash tables define such an event. Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder