Skip to Content
Expert C# 5.0: with the .NET 4.5 Framework
book

Expert C# 5.0: with the .NET 4.5 Framework

by Mohammad Rahman
December 2012
Intermediate to advanced content levelIntermediate to advanced
612 pages
14h 4m
English
Apress
Content preview from Expert C# 5.0: with the .NET 4.5 Framework

CHAPTER 8

images

Event

This chapter will discuss the event program. A type that defines an event member allows other types to subscribe for the notification when something happened in the type. We start by designing a type, which, when exposed to the event where subscribers are to subscribe, implements the code to handle the event and explains the concept of the event in C# language. We will then explore the behind the scenes workings of the event, for example, how C# compiler translates an event member to implement, add, and remove a method. We also examine how the subscription operator, for example, += and -=, will be translated to use the add and ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro C# 5.0 and the .NET 4.5 Framework, Sixth Edition

Pro C# 5.0 and the .NET 4.5 Framework, Sixth Edition

Andrew Troelsen
C# 4.0 Unleashed

C# 4.0 Unleashed

Bart De Smet

Publisher Resources

ISBN: 9781430248606Purchase book