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

What is the use of common language runtime?

604


What's typical about a windows process in regards to memory allocation in .net?

580


The project which you have made, which methodology did you use?

587


How do you instantiate a complex number?

596


Please explain what is a delegate?

693






Will my .net app run on 64-bit windows?

602


One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?

523


Explain what is reflection in microsoft .net context?

563


Is there built-in support for logging?

620


explain the states of a window service application?

556


Is there any attempt system for microsoft technology papers?

1299


what will do to avoid prior case?

594


How to spawn a thread?

579


What are Attributes in .NET?

585


Why do we use the “using” statement?

542