Can u explain me What is encapsulation?

Answer Posted / megha

Details of what a class contains is not visible to other
classes.Instead only specific information is made visible.
ATM center is one real world example.
Encapsulation is achieved with the help of properties.
ex:-
int _empno;
public int EmpNo
{
get
{
return _empno;
}
set
{
_empno=value;
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the compilation process for .net code?

608


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

1593


Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?

521


How inheritance works in .net?

561


What is RCW (Run time Callable Wrappers)?

1958






Explain about the features and elements present in Visual studio.NET IDE?

619


Explain how to spawn a thread?

541


How to view a .NET assembly?

602


What is typical about a windows process in regards to memory allocation in dot net?

565


What is the difference between a debug and release build?

587


What does jit compilation do in .net?

576


What are the different types of remote object creation mode in .net?

575


Is .net core free?

573


Explain the differences between server-side code and client-side code.

571


What is difference between static page and dynamic page?

530