What is the difference between protected and protected internal?
Answer Posted / anusha
Internal:
When Members of a class are declared as internal, then they can be accessed
1. within the class in which they are declared.
2. within the derived classes of that class available within the same assembly.
3. outside the class within the same assembly.
Protected:
When Members of a class are declared as protected, then they can be accessed
1. within the class in which they are declared.
2. within the derived classes of that class available within the same assembly.
3. within the derived classes of that class available outside the assembly.
Protected internal:
When Members of a class are declared as protected internal, then they can be accessed
1. within the class in which they are declared.
2. within the derived classes of that class available within the same assembly.
3. outside the class within the same assembly.
4. within the derived classes of that class available outside the assembly.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How can I get the ascii code for a character in c#?
Is c# int immutable?
What is asax file in c#?
Define a jagged array in c#?
How to reduce image resolution in C#?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
What are the value types in c#?
What are abstract classes in c#?
What is an xsd file?
How does return work in c#?
Which constructor is called first in c#?
How do you serialize in c#?
What is the data type for bit in c#?
What are boxing and unboxing?
Explain the difference between a namespace and assembly name in .net?