Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How you apply a theme in whole application in .Net?

1227


Explain Different kinds of methods?

2112


How do you define the lease of the object in .net?

1001


What do you mean by Code Access Security in .NET?

1186


What are pdbs?

1089


Please explain what is the difference between a class and an object?

1054


What is connection pooling and how do you make your application use it?

1046


What is the difference between encrypting a password and applying a hashing?

1164


What is lazy initialization?

1064


When we use windows api in .net is it managed or unmanaged code?

1091


How to get the number after decimal point in .net?

1016


What are the improvements made in cas in .net 4.0?

970


Explain what is an application domain?

988


How anonymous method is different from a lambda expression?

1012


Compare & contrast rich client (smart clients or windows-based) & browser-based web application

971