Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Events in C# language within the C# forums, part of the Software Development category; Question asked by Visitor Mansoor Can someone explain me events in c# language? any example will help....
|
|||||||
|
|||
|
Re: Events in C# language
First I would like u to understand what the event is?
Event in simple meaning is any interaction of a user to the system that causes the system to take actions is event. E.g. when you (a user) click a link (interaction) in this page you initiate an ineraction with this page. Now this ineraction (event) would cause the system to take actions. The event is like waking call to the system. A notification message to the system that says that any thing happened. the whole processing model is based on this user<-->Ineraction<-->System<-->Execute Event Code this is called event driven model. In C# or VB the event is managed by the delegates that take any event method as an argument and execute proper method whenever user interact with the system. You define event code for any contol or page in seperate method like Page_Load for page loading event or button1_Click method for button.. e.g protected void button_Click(object sender, EventArgs e) { //Your implementaion } you register this event as: button1.OnClik+=new EventHandler(button_Click); //Delegate But behind the scenes windows OS model manages these events through window messages running on different threads. So you can say the event model in C# is higher level of abstraction of this window messaging. For further reading please refer to any C# books or MSDN Online. Last edited by bhaskarjha; 04-09-2007 at 12:48 PM. |
|
|||
|
Re: Events in C# language
In google search for 'function X ' you'll get a good article on Events and exception handling and many more. It's very good set of articles for beginner
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GOOGLE's programming language | ITGuy | Geeks Lounge | 4 | 09-14-2009 09:57 AM |
| GD-001 Among all the OOPS Language, which one is the best? Why it is the best? | admin | Group Discussions | 19 | 12-14-2007 02:34 AM |
| Watching XP system events! | Lokesh M | Windows | 1 | 01-10-2007 06:41 PM |
| Language problem | joel | Interviews | 3 | 01-06-2007 01:50 AM |
| C Language - The Preprocessor | Lokesh M | C and C++ | 1 | 06-17-2006 07:41 AM |