Here is the listing of C# programming examples on Events.
1. C# Examples on Mouse Handling Events
In the MOUSEUP Event, when the mouse is moved up over the button message box is displayed in windows forms application. The KEYUP event is generated when the user releases a key on the keyboard. TimeSpan represents a certain time period. The following programs perform addition and subtraction with MOUSEUP Event and KEYUP Event and adds two TimeSpans.
C# Program to Perform Addition with MOUSEUP Event
C# Program to Add Two TimeSpan
C# Program to Perform Subtraction with Key Up Event
2. C# Examples on Displaying the Times
With universal times, you can compare times from different locations with no errors. The following Programs determine the day time and universal time of various locations. The programs also determine if the enter key is pressed or not, gets the day and the DayLight saving information.
C# Program to Detect Whether ENTER key is Pressed or Not
C# Program to get the Universal Time
C# Program to get the Local Time
C# Program to Get the DayLight Saving Information
3. C# Examples on Predicates and Actions
A predicate delegate is a delegate which is a boolean function that returns true or false and takes a generic type as an argument. Radio buttons are used to select just one option from a set of alternatives. The following programs illustrates Predicates and Actions, creates a Progress Bar Control, creates Input Box and displays the text and creates a Radio Button and demonstrates its use.
C# Program to Illustrate Predicate
C# Program to Illustrate Actions
C# Program to Create a Progress Bar Control
C# Program to Create Input Box and Display the Text
C# Program to Create Radio Button and Demonstrate its Use
4. C# Examples on Elapsed Events and Clones
Event handlers attached with .on() are triggered when the corresponding event occurs. C# Clone() method creates and returns a copy of the object. The Elapsed event occurs if the Enabled property is true and the time interval defined by the interval property elapses. The following programs illustrate elapsed event, demonstrates the use of clone, demonstrates the concept of trigger and creates a stop watch.
C# Program to Illustrate Elapsed Event
C# Program to Demonstrate Use of Clone
C# Program to Demonstrate Trigger Concept
C# Program to Create Stop Watch