O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

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

Chapter 15. C# events

I recommend that you read and understand Chapter 14 before proceeding.

Any modern programming language has an efficient event model, and C# is no exception. The concepts in C#'s event model are quite similar to Java 2's event delegation model: – we still have the event source, the event consumer, and the event object. However, unlike Java 2's event delegation model, C#'s model uses an event object which is a special type of C# delegate.

I will start by examining the generic event model, then zoom in to C# specifics. If you are familiar with events, jump to section 15.2.

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