Monday, December 31, 2012

Difference between Internal, Protected and Protected Internal in c#?


Internal – 

Class member can be accessible within the assembly either through object or in a derived class. Not outside the assembly.

Protected – 

Class member can be accessible in a derived class within the assembly and outside the assembly also.

Protected Internal – 

Class member can be accessible within the assembly either through creating object or in a derived class. And Accessible outside the assembly in a derived class only.

Protected Internal means Protected or Internal.

No comments:

Post a Comment