TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C# Coding Standard
Search

Category: Naming

Synopsis:Naming conventions


Description:

Coding Rules

NameCheckedSynopsis
3@101 Use US-English for naming identifiers
3@102 Checked automatically with code checker Use Pascal and Camel casing for naming identifiers
3@103 Do not use Hungarian notation or add any other type identification to identifiers
3@104 Checked automatically with code checker Do not prefix member fields
3@105 Checked automatically with code checker Do not use casing to differentiate identifiers
3@106 Use abbreviations with care
3@107 Checked automatically with code checker Do not use an underscore in identifiers
3@108 Name an identifier according to its meaning and not its type
3@109 Checked automatically with code checker Name namespaces according to a well-defined pattern
3@110 Checked automatically with code checker Do not add a suffix to a class or struct name
3@111 Use a noun or a noun phrase to name a class or struct
3@112 Checked automatically with code checker Abbreviations with more than two letters should be cased as words
3@113 Checked automatically with code checker Prefix interfaces with the letter I
3@120 Use similar names for the default implementation of an interface
3@122 Checked automatically with code checker Suffix names of attributes with Attribute
3@201 Checked automatically with code checker Do not add an enum suffix to an enumeration type
3@202 Use singular names for enumeration types
3@203 Use a plural name for enumerations representing bitfields
3@204 Checked automatically with code checker Do not use letters that can be mistaken for digits, and vice versa
3@301 Add EventHandler to delegates related to events
3@302 Add Callback to delegates related to callback methods
3@303 Checked automatically with code checker Do not add a Callback or similar suffix to callback methods
3@304 Use a verb (gerund) for naming an event
3@305 Checked automatically with code checker Do not add an Event suffix (or any other type-related suffix) to the name of an event
3@306 Checked automatically with code checker Use an -ing and -ed form to express pre-events and post-events
3@307 Prefix an event handling method with On
3@401 Suffix exception classes with Exception
3@402 Do not add code-archive related prefixes to identifiers
3@501 Name DLL assemblies after their containing namespace
3@502 Do not add MR building block prefixes to source files
3@503 Checked automatically with code checker Use Pascal casing for naming source files
3@504 Checked automatically with code checker Name the source file to the main class
3@505 Checked automatically with code checker Only use the this. construction to avoid a name clash
3@510 Use descriptive names for generic type parameters
3@511 Checked automatically with code checker Give a thread a useful name