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 windows forms in c#?

866


Why c# is called type safe language?

787


Can we change static variable value in c#?

876


Explain the difference between the debug class and trace class?

851


why delegate is type safe?

2955


What's the difference between abstraction and encapsulation?

848


what is inheritance and an example in vb.net and c# of when you might use it?

900


How do I make a dll in c#?

875


What is the use of xmlserializer?

820


Is c# lazy thread safe?

852


What are extender provider components? Explain how to use an extender provider in the project.

852


How many bytes is an int c#?

836


What is difference between first and firstordefault?

868


What is desktop GUI application?

878


What is the meaning of 0 in c#?

947