Abstraction

An abstraction describes what something should do without actually showing you how to do it. According to the Microsoft documentation:

"An abstraction is a type that describes a contract but does not provide a full implementation of the contract."

Included as examples of abstractions are abstract classes and interfaces. Examples of abstractions in the .NET Framework include Stream, IEnumerable<T>, and Object. If the topic of abstraction seems a bit fuzzy now, don't worry. I will go into much more detail in the section on encapsulation and the difference between encapsulation and abstraction.

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.