Basically, we have 4 access modifiers in C#. public, protected, internal and private. Here are the definitions for each modifier:
1. The public
] keyword is an access modifier for types and type members. Public access is the most permissive access level. There are no restrictions on accessing public members.
2. The protected
] keyword is a member access modifier. A protected member is accessible from within the class in which it is declared, and from within any class derived from the class that declared this member.
3. The internal
] keyword is an access modifier for types and type members. Internal members are accessible only within files in the same assembly. A common use of internal access is in component-based development because it enables a group of components to cooperate in a private manner without being exposed to the rest of the application code. For example, a framework for building graphical user interfaces could provide Control and Form classes that cooperate using members with internal access. Since these members are internal, they are not exposed to code that is using the framework.
4. The private
] keyword is a member access modifier. Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared
So in short, depending on the non-public variable, there are different accessibility levels on your members.