Object-oriented programming

As briefly mentioned earlier, OOP provides a modular approach to writing self-contained units of code. The concept of OOP centers around what we call the four pillars of object-oriented programming.

They are as follows:

  • Abstraction
  • Polymorphism
  • Inheritance
  • Encapsulation

The order doesn't really matter, but I always write the four pillars in this order because I use the mnemonic A PIE to remember each one. Let's discuss each of these concepts in more detail.

Get C# 7 and .NET Core 2.0 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.