Can u explain me What is encapsulation?

Answer Posted / megha

Details are what a 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 difference between asp.net and asp?

601


Why do we use msmq?

603


Is .net core the future?

577


Explain me why do we use msmq?

567


What is Complex Class in .NET?

610






Tell us why do we use the “using” statement?

551


Explain what is the difference between odbc and ado?

519


Explain the difference between asp.net and asp?

568


How do you view the methods and members of a dll?

621


Explain what does managed mean in the .net context?

509


Write the .net syntax for 'while loop'?

585


Is the COM architecture same as .Net architecture? What is the difference between them (if at all there is)?

1575


Difference between class and interface in .net?

591


Can you explain what do you understand about web service?

610


How to instantiate a delegate?

1648