This chapter is about deriving new types from existing ones using object-oriented programming (OOP). You will learn about defining operators and C# 7 local functions for performing simple actions, delegates and events for exchanging messages between types, implementing interfaces for common functionality, inheriting from a base class to create a derived class to reuse functionality, overriding a type member, using polymorphism, creating extension methods, and casting between classes in an inheritance hierarchy.
This chapter covers the following topics:
- Setting up a class library and console application
- Simplifying methods with operators
- Defining local functions
- Raising and handling events