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

Explain the difference between constants and read-only variables?

781


Explain the process of compilation in .NET?

857


When a Static Constructor called in .NET?

796


What is il in vb.net?

809


What is an anonymous method?

772


Explain the difference between the stack and the heap?

750


Explain attributes in dot net?

819


How do I spawn a thread?

755


Tell me what is serialization?

783


What does mean by .net framework?

786


SAP Business One(this is intigrated tool of .net)

1994


Explain what are the deferred execution and the immediate execution in linq?

796


Tell about your technical profile ?

3326


Explain about .net assemblies?

820


What is connected and diconnected database ?

826