Object-oriented design principles

C# is a general-purpose language that can work in a managed environment. It is the .NET Common Language Runtime (CLR) that handles the most tricky logic for us, such as the lifecycle of variables and their removal from memory, process isolation, thread abstraction, variably safe typing, and so on.

Although we will assume that we will use C# only in object-oriented programming (OOP), the language itself supports other paradigms as well.

Note

In terms of class design, the following tenets are at the basis of OOP:

  • Encapsulation: Any class can hide its core logic in external items.
  • Inheritance: Any class can expand the capability of a mother class, by adding more specific properties or adding/changing logics.
  • Polymorphism ...

Get Learning .NET High-performance Programming 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.