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
Explain what are possible implementations of distributed applications in .net?
Tell us what is json data, and what is one way that .net developers can work with json?
Explain attributes in dot net?
What is the use of Treeview control?
What data providers available in .net to connect to database?
Explain about the Common Language Runtime?
What is 3 tier architecture?
Explain the difference between asp.net & vb.net and explain architecture?
Please explain what is heap and what is stack?
Which file is taken by compiler when we have both file Application and Server Configuration file?
What is immutability?
What are the new 2.0 features useful for?
How to produce an assembly?
How to convert a .NET object into COM operabililty?
What is .net and .net framework?