0
Internal keyword
I’m farther in C#, and I’ve come across private, public, protected, and sealed. I was looking Through comments, just to make sure I understand, and some people were saying there were more. There are two others: Internal, and protected internal. What do they do?
3 Réponses
0
Fernando Pozzeti What do you mean by “assembly?”
0
Assembly meaning part of the code
- 1
protected
The type or member can be accessed only by code in the same class, or in a class that is derived from that class.
internal
The type or member can be accessed by any code in the same assembly, but not from another assembly.
protected internal The type or member can be accessed by any code in the assembly in which it is declared, or from within a derived class in another assembly.
private protected The type or member can be accessed only within its declaring assembly, by code in the same class or in a type that is derived from that class.