Summary:
internal is for the scope of the assembly (that is, only accessible from the code in the same .exe or .dll). Internal members are only accessible within the assembly by inheritance (its derived type) or by class instance.
Reference:
dotnetbull: what is the access modifier in C # (Info in English)
Expanded:
Classes / utility methods or helpers that you would like to access from many other classes within the same assembly, but to which you want to make sure that the code in other assemblies can not access.
From the official reference C # :
A common use of internal access is in component-based development because it allows a group of components to cooperate privately without being exposed to the rest of the application code. For example, a framework for building graphical user interfaces could provide Control classes and Forms that cooperate using members with internal access. Because these members are internal, they are not exposed to the code that the framework uses.
You can also use the internal switch together with the InternalsVisibleTo
of assembly level to create "friend" assemblies that are given special access to the inner classes of the target assembly.
This can be useful for the creation of unit test sets that can then call the internal members of the set to be tested. Of course, no other assembly is granted this level of access, so when it releases its system, the encapsulation is maintained.