Here is my scoping/access modifier cheat sheet.
- Public Class - Access is not restricted.
- Private Class - Only valid for nested classes
- Internal Class - only visible to the assembly
- Private Member - only available to the containing type
- Protected Member - Available to the containing type and anything derived from the containing type.
- Internal Member - available to current assembly.
- Protected Internal Member - Available to current assembly or anything derived from containing type.
- Public Member - Access is not restricted
Valid Member Access Modifiers:
- Enum - public
- Interface - public
- Class - public, private, internal, protected, protected internal
- Struct - public, private, internal
- Abstract class - cannot be instantiated. May have abstract and non abstract methods. Derived class must implement all abstract methods.
- Sealed Class - Cannot be inherited
- Virtual Method - may be overridden
- Abstract method - no implementation, must be overridden
- Sealed method - Cannot be overridden
- Sealed Override Method - No longer may be overridden. Public sealed override MyMeth()