Event Handling With C#
(Page 1 of 5 )
C#'s event handling mechanisms are powerful and don't have to be complicated. In this article Deepak introduces us to the concepts of delegates, event handlers and GUI event handling using C#.In this article I discuss the event-handling model in .NET using C#. The discussion starts with an introduction to the concept of delegates and then it extends those concept to events and event handling in .NET. Finally, I apply these concepts to GUI event handling using windows forms.
Event handling is familiar to any developer who has programmed graphical user interfaces (GUI). When a user interacts with a GUI control (e.g., clicking a button on a form), one or more methods are executed in response to the above event. Events can also be generated without user interactions. Event handlers are methods in an object that are executed in response to some events occurring in the application. To understand the event-handling model of the .Net framework, we need to understand the concept of delegates, so let’s look at them first...
Next: Delegates in C# >>
More C# Articles
More By Deepak Dutta