Access Modifiers

private

Private members are accessible only within the body of the class or the struct in which they are declared

public

Public access is the most permissive access level. There are no restrictions on accessing public members

protected

A protected member is accessible within its class and by derived class instances.

internal

Internal types or members are accessible only within files in the same assembly

protected internal

A protected internal member of a base class is accessible from

  1. any type within its containing assembly.
  2. It is also accessible in a derived class located in another assembly only if the access occurs through a variable of the derived class type

private protected

A private protected member of a base class is accessible from derived types in its containing assembly only if the static type of the variable is the derived class type