Organizations

  • Modifiers occur in the following order:
public
internal
private
new
abstract
virtual
override
sealed
static 
readonly
extern
unsafe
volatile
async
  • Class member ordering:
    • Group class members in the following order:
      • Nested classes, enums, delegates and events.
      • Static, const and readonly fields.
      • Fields and properties.
      • Constructors and finalizers.
      • Methods.
    • Within each group, elements should be in the following order:
      • Public.
      • Internal.
      • Protected internal.
      • Protected.
      • Private.
    • Where possible, group interface implementations together.

Learn More