Interviews1 answer
What is protected internal modifier in C#?
1 Answer
The protected internal accessibility means protected OR internal, not protected AND internal.
In other words, a protected internal member is accessible from any class in the same assembly, including derived classes.
The protected internal access modifier seems to be a confusing but is a union of protected and internal in terms of providing access but not restricting. It allows:
• Inherited types, even though they belong to a different assembly, have access to the protected internal members.
• Types that reside in the same assembly, even if they are not derived from the type, also have access to the protected internal members.
for similar kind of C# questions you can refer this link
c# interview questions
Krishna MohanPosted Apr 29, 2014, 9:42 PM EDT