What is abstraction in C#? Explain in details.
Loading
What is abstraction in C#? Explain in details.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajanikant HawaldarPosted Sep 7, 2022, 8:33 AM
Rajeev KumarPosted Mar 3, 2023, 7:19 AM
In Abstraction, by using access modifiers, we can hide the required details of the object and expose only necessary methods and properties through an object's reference. In real-time, the laptop is a perfect example of abstraction in c#.
Lalit HolkarPosted Sep 8, 2022, 9:43 AM
PatelPosted Sep 8, 2022, 6:57 AM
Amit MohantyPosted Sep 8, 2022, 4:29 AM
Vishal YelvePosted Sep 7, 2022, 6:26 AM
Abstraction allows making relevant information visible and encapsulation enables a programmer to implement the desired level of abstraction.
Abstraction can be achieved using abstract classes in C#. C# allows you to create abstract classes that are used to provide a partial class implementation of an interface.
for more details please refer below links
Shiv Prasad Koirala Sir Video.
https://youtu.be/0EnSPBVrbG0
OR
Kudvenket video
https://www.youtube.com/watch?v=7amjs2y_dgo
https://www.youtube.com/watch?v=yyU3bXyc_oU
https://www.geeksforgeeks.org/c-sharp-abstraction/
https://www.c-sharpcorner.com/UploadFile/4624e9/abstraction-in-C-Sharp/
Alkesh BijarniyaPosted Sep 7, 2022, 6:23 AM
Abstraction is "To represent the essential feature without representing the background details."
Abstraction lets you focus on what the object does instead of how it does it.
Abstraction provides you a generalized view of your classes or objects by providing relevant information.
Abstraction is the process of hiding the working style of an object, and showing the information of an object in an understandable manner.
Real-world Example of Abstraction
Suppose you have an object Mobile Phone.
Suppose you have 3 mobile phones as in the following:
Nokia 1400 (Features: Calling, SMS)
Nokia 2700 (Features: Calling, SMS, FM Radio, MP3, Camera)
Black Berry (Features:Calling, SMS, FM Radio, MP3, Camera, Video Recording, Reading E-mails)
Abstract information (necessary and common information) for the object "Mobile Phone" is that it makes a call to any number and can send SMS.
Abstraction means putting all the variables and methods in a class that are necessary.
For example: Abstract class and abstract method.
Abstraction is a common thing.