Events Sample
This sample shows how to declare, invoke, and hook up to events in C#.
This sample contains the source code for the Events Tutorial.
Building and Running the Sample Within Visual Studio
To build and run the Events samples
- Open the solution (Events.sln).
- In Solution Explorer, right-click the Events1 project and click Set as StartUp Project.
- From the Debug menu, click Start Without Debugging.
- Repeat the preceding steps for Events2.
Building and Running the Sample from the Command Line
To build and run the Events samples
- Use the Change Directory command to change to the Events1 directory.
- Type the following:
csc events1.cs events1
- Use the Change Directory command to change to the Events2 directory.
- Type the following:
csc events2.cs events2