What Is Abstraction?
Explore the concept of abstraction in C# by understanding how essential features of objects are exposed while hiding implementation details. This lesson covers real-world examples and demonstrates C# features like abstract classes and interfaces to help you simplify complex programming tasks.
We'll cover the following...
We'll cover the following...
Definition
Abstraction refers to exposing only the essential features of an object to the user and hiding the inner details to reduce complexity. It can be put this way: the user only has to know what an object does? rather than how it does it?.
Real-world Examples
The above illustration of the users and the admin of an application is a good real-world example of abstraction.
- A user can only use and interact with the limited features of an application, i.e., the user interface, and is unaware of the implementation details or the way the application was developed. Usually, the users are only concerned with the functionality of an application.
- An admin can have the access to a lot more features