How encapsulation and abstraction defined/used in C#.NET.

Answer Posted / animesh

Encapsulation means hiding the inner details from the user
For eg. We know that to open a lock we put key inside it
but what key will do inside the lock is hiddden. We use
inheritance for encapsulation similarly we use Abstract
classes to define abstraction in C#.

Is This Answer Correct ?    17 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is escape sequence in c#?

595


What is the use of regex in c#?

494


What is namespace c#?

475


what is the difference between .dll and .exe

528


Is it possible to have different access modifiers on the get/set methods of a property?

514






You are creating a custom usercontrol, some of the newly created properties are shown in the properties window. How you can hide a new property named theme from the properties window?

498


What is array class in c#?

459


What namespace is list in c#?

488


What does executescalar return in c#?

454


What is hash c#?

495


What is the difference between method and function in c#?

445


How to move to a state-related codebase?

893


What is boxing and unboxing in c#?

468


If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?

549


Why do we need encapsulation in c#?

504