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...

What are the access-specifiers available in c#?

Answer Posted / anupam dixit

1. Public: Any member declared public can be accessed from
outside the class.

2. Private: it allows a class to hide its member variables
and member functions from other class objects and function.
Therefore, the private member of a class is not visible
outside a class. if a member is declared private, only the
functions of that class access the member.

3. Protected: This also allows a class to hide its member
var. and member func. from other class objects and
function, except the child class. it becomes important
while implementing inheritance.

4. Internal: Internal member can be expose to other
function and objects. it can be accessed from any class or
method defined within the application in which the member
is defined

5. Protected Internal: it's similar to Protected access
specifier, it also allows a class to hide its member
variables and member function to be accessed from other
class objects and function, excepts child class, within the
application. used while implementing inheritance.

Is This Answer Correct ?    126 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you know about Translate Accelerator?

1021


What are the problem with .NET generics?

947


How do you implement thread synchronization (object.wait, notify,and criticalsection) in c#?

1028


Why is it important to override gethashcode when equals method is overridden?

990


List out two different types of errors in c#?

897


What is the namespace for datatable in c#?

930


What is exe in c#?

885


Why we need get set property in c#?

938


Is dll a library?

881


Where do I put dll files?

977


Can delegates be used as callbacks?

874


How many dimensions can an array have?

851


What does the parsefloat function do?

881


What is console based application?

930


Can a class or a struct have multiple constructors?

923