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?

5th Nov 2019, 1:18 AM
Jake
3 Réponses
0
Fernando Pozzeti What do you mean by “assembly?”
6th Nov 2019, 7:55 PM
Jake
0
Assembly meaning part of the code
6th Nov 2019, 8:13 PM
Fernando Pozzetti
Fernando Pozzetti - avatar
- 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.
5th Nov 2019, 2:08 AM
Fernando Pozzetti
Fernando Pozzetti - avatar