Page 20 : 20
Object-oriented Programming in C#
Operators, Delegates, and Events
* Overloaded Operators
Why operator overloading?
Overloadable operators in C#
An example of overloaded operators: Interval
Some details of operator overloading
* Delegates
Delegates in C#
Delegates that contain instance methods
Multivalued delegates
Lambda Expressions
* Events
Events
Events in C#
Examples of events
* Patterns and Techniques
Motivation - Example
The observer design pattern
An Observer Example
Observer with Delegates and Events
Observer Example with Delegates and Events
Observer Example with Delegates and Events
Application of the two different Watchers.
A WeatherCenter (subject) and Temperature/Rain Watchers (observer) with events.
Output of the WeatherCenter and Watchers application.