i am new to C# and reading this
protected: Only derived types or members of the same type.internal: Only code within the same assembly. Can also be code external to object as long as it is in the same assembly. (default for types)protected internal: Either code from derived type or code in the same assembly. Combination of protected OR internal.
whats protected internal for? doesn’t internal also allow derived types to access the variables?
and whats an assembly?
Assemblies
An assembly is the .dll or .exe file that you get from compiling your code. If you have multiple projects within Visual Studio, then they will compile to different assemblies.
See Assemblies on the MSDN for more information.
Protected Internal
protected internalmeans it can be accessed both from sub-classes and classes within the same assembly. It is a more visible access modifier thanprotectedorinternalalone. If you want to restrict class members to only derived classes within the same assembly, then you must mark the class itself asinternaland its members asprotected.See Access Modifiers (C# Programming Guide) for more information.