Access Modifiers
There are four modifiers for class members: public, private, protected, and internal (plus the combination of protected internal). These control whether a member is accessible to other code inside and outside the class. You already know public members, which can be called from any instance of the class. Private members can only be accessed from within the class. Protected members may be accessed from within the class or from within a derived class. Internal members may only be accessed from within other classes in the same assembly.You'll see these modifiers in use right away in the chapter, starting with public constructors and private variables.