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
What is difference between .net and c#?
What does void mean unity?
What are the differences between value types and reference types?
Why attributes are used in c#?
What are the collection types can be used in c#?
How many constructors can a class have in c#?
Differentiate between static class and singleton instance?
Explain lock, monitors, and mutex object in threading.
What is the difference between a field and a property in c#?
what is the difference between a struct and a class in c#?
What is access modifier in c#?
What is the difference between abstract and abstraction?
How do I format a string in c#?
How do I format in c#?
What is tochararray in c#?