Congratulations Vithal Wadje for Completing 100 Articles on C# Corner
Carrer Advice: Success Requires Continuity
C# Corner Q3, 2014 MVPs Announced
Go to all article comments >>
Go to all messages >>
A Code Snippet
An Interview Question
Ask a Question
Visual Studio .NET
Visual Studio 2012
C, C++, MFC
Visual Studio 2013
Algorithms in C#
Printing in C#
WCF with C#
Databases & DBA
Web Services in C#
Reports using C#
Design & Architecture
Multithreading in C#
Security in .NET
Windows Forms C#
Windows Store Apps
How do I
Visual Basic .NET
Internet & Web
Request a new Category
Cookie and Queries string, Session ...
Prevent Partial view to access dir ...
How to Count Total Number of HIT i ...
Pure Redirection using WebRequest ...
All about Singleton Pattern
Congratulations Vithal Wadje for C ...
Saving Values in XML and Retrievin ...
Dynamic Menu in WPF
Design Patterns Introduction
Message Exchange Patterns in WCF
Abstraction and Encapsulation
Jun 13, 2012
In this blog we will lean about Abstraction and Encapsulation.
Abstraction allows us to represent complex real world in simplest manner. It is process of identifying the relevant qualities and behaviors an object should possess, in other word represent the necessary feature without representing the back ground details. Abstraction is a process of hiding work style of an object and showing only those information which are required to understand the object. Abstraction means putting all the variables and methods in a class which are necessary.
It is a process of hiding all the internal details of an object from the outside real world. The word Encapsulation, like Enclosing into the capsule. It restrict client from seeing its internal view where behavior of the abstraction is implemented. In Encapsulation, generally to hide data making it private and expose public property to access those data from outer world. Encapsulation is a method for protecting data from unwanted access or alteration. Encapsulation is the mechanism by which Abstraction is implemented.
Difference between Abstraction and Encapsulation
Abstraction is a process. It is the act of identifying the relevant qualities and behaviors an object should possess. Encapsulation is the mechanism by which the abstraction is implemented.
Abstraction solves the problem in the design level.
Encapsulation solves the problem in the implementation level.
Abstraction is used for hiding the unwanted data and giving only relevant data.
Encapsulation is hiding the code and data into a single unit to protect the data from outer world.
Abstraction is set focus on the object instead of how it does it.
Encapsulation means hiding the internal details or mechanics of how an object does something.
Abstraction is outer layout in terms of design.
For Example: - Outer Look of a iPhone, like it has a display screen.
Encapsulation is inner layout in terms of implementation.
For Example: - Inner Implementation detail of a iPhone, how Display Screen are connect with each other using circuits
Abstraction in C#
What Is Encapsulation in C#
View Previous Comments >>
Hire Mobile & Web Developer
Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.
Filtering External list in SharePoint 2013
How to Create Razor Function in Asp.Net MVC View?
Default Content Access Account in SharePoint 2013
What is the Use of .noConflict() Method in Jquery?
Draw rectangle on CView and Track using CRectTracker
Show Date and Time withOut Post Back
7 Golden Rules to Impress Your Project Leader
Pure Redirection using WebRequest and WebResponse
SharePoint 2013: Minimal Download Strategy
Limit And Show Char In TextBox using jQuery
CBeyond Cloud Services
TERMS & CONDITIONS
©2014 C# Corner. All contents are copyright of their authors.