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
Why dependency injection is used in c#?
Explain the types of Polymorphism.
What is datagrid c#?
How many types of constructors are available in c#?
Do vs while c#?
What is scope c#?
Name the control which cannot be placed in mdi?
Is c# pass by value?
Explain About remoting and web services. Difference between them
Is stringbuilder faster than string concatenation c#?
If you define a user defined data type by using the struct keyword, is it a value type or reference type?
Can we have static indexer in c#?
Why do we need static in c#?
What will a loop recorder show?
Explain About sn.exe