Can u explain me What is encapsulation?
Answer Posted / manikanta.srinu
Wraping(Binding) of data in a single unit.
Encapsulation is combines one or more information into a
component.
* You hide the data for security such as making the
variables as private, and expose the property to access the
private data which would be public.
So, when you access the property you can validate the
data and set it.
Eg 1: Capsule is mixed with one or more medicine and packed
into the tube. so its related and acting in two moducles.
EX:public class Demo
{
private int _mark;
public int Mark
{
get { return _mark; }
set { if (_mark > 0) _mark = value; else _mark = 0; }
}
}
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
What is misl?
What are the security policy levels in .Net
What is finalize method in .net?
Describe the Managed Execution Process
Why SOAP is required?
What is difference between static page and dynamic page?
Explain clr, cts and cls?
What's the use of system.diagnostics.process class in .net?
Where does the gac exist ?
What are an object and a class?
why you wouldn't want to write into it even if you could
Compare & contrast rich client (smart clients or windows-based) & browser-based web application
Explain me what is the difference between an abstract class and an interface?
What is singlecall activation mode used for in .net?
How to produce an assembly?