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

Can a loop recorder detect a heart attack?

1018


Why do we use classes?

888


How many bytes is an int in c#?

939


How can you prevent escaping on backslashes in C# with string definitions?

1244


What is an assembly in .net?

993


What is alias in c#?

955


What is data annotation in c#?

939


can multiple catch blocks be executed for a single try statement?

980


Is c# code is unmanaged or managed code?

1124


What is difference between dictionary and hashtable in c#?

880


What is c# windows form application?

966


Can properties be overloaded in c#?

966


What is final keyword in c#?

999


What is cls, cts and clr in net?

916


Can an interface extend a class c#?

962