O'Reilly logo

Microsoft® Visual Studio® 2010 Unleashed by Lars Powers, Mike Snell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and Raising Events

There is not much functionality you can build using the .NET languages without events. Events enable one piece of code to notify another bit of code that something has just happened. Code that raises events are said to publish an event and those that receive the event notice are said to subscribe to events. A simple example is when you write a user interface for the Web or Windows. In these cases, you are consistently adding code that subscribes to events published by the UI such as a user clicking on a button control. Of course an event may have more than a single subscriber and subscribers may be subscribed to multiple events.

Create an Event

When you create an event you need to determine if you need to pass custom ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required