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

difference between keyword internal and protected?

Answer Posted / dotnetasit

The keywords 'internal' and 'protected' are access modifiers.
If any member in a class is qualified with access
modifier 'internal', then it is friend to the current assembly
but not outside of it. This means any member or class(but not
the dervied classes) within the current assembly can access it.

On the other hand, any member qualified with access
modifier 'protected' can be accessed by derived classes only.

I also want to tell about the combined access
modifier 'protected internal'. Any member qualified with
access modifier 'protected internal' is accessible to the
derived classes as well as to any member or class within the
same assembly. So in a way, this combined modifier extends the
scope of 'internal'.

Is This Answer Correct ?    25 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c# and why it is used for?

992


Is multilevel inheritance possible in c#?

966


Illustrate the differences between the system.array.copyto() and system.array.clone()?

1029


What is dataset c#?

1002


What is gridview c#?

953


What is a thread? What is multithreading?

985


Can abstract class have constructor?

919


What is a statement c#?

1052


In .NET which is the smallest unit of execution?

1109


What is the difference between method and function in c#?

959


What types of object can I throw as exceptions?

979


List down the differences between public, static and void keywords?

913


What is a protected class c#?

936


What is scope c#?

923


Is goto statement supported in c#?

979