Coding Style C

Location: igium / Coding Style C#

General Guidelines

  • Avoid abbreviations in any names
  • Avoid non-private nested classes

Naming Conventions

NOTE: Underscore usage is permitted for grouping and namespacing purposes.

  • field (public): capital letters (e.g. Offset, LongLength, Stream_LongLength)
  • field (other): camel case (e.g. offset, isEmpty, stream_isEmpty)
  • method (all): capital letters (e.g. GetOffset, IsEmpty, Parse_FromInt)
  • property (all): capital letters (e.g. Offset, LongLength, Stream_LongLength)
  • function parameter: camel case (e.g. offset, isEmpty, stream_isEmpty)
  • local variable: camel case (e.g. offset, isEmpty, stream_isEmpty)
  • class name: capital letters (e.g. Parser, JsonParser, Parser_Json)
  • enum name: capital letters, prefixed by 'E' (e.g. EKind, EJsonParserTokenType, ETokenType_JsonParser)
  • enum field: capital letters (e.g. Unknown, LongNumber, Json_LongNumber)
  • generic parameter: abbreviated all caps (e.g. T, IDT)
  • constant: capital letters (e.g. RootPath, DefaultExtention, Files_DefaultExtention)