Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
On the whole, naming should follow C# standards.
Namespaces are all PascalCase, multiple words concatenated together, without hypens ( - ) or underscores ( _ ):
Namespaces should be used for major systems, such as Atmospherics, or Electrics. Everything else should be without namespace.
BAD:
GOOD:
Methods are written in PascalCase. For example DoSomething
()
.
Classes are written in PascalCase. For example RadialSlider
.
Interfaces should always have the prefix I
, as in IOpenable
.
Parameters are written in camelCase.
BAD:
GOOD:
Single character values are to be avoided except for temporary looping variables. You can also use _
for unused variables, m
for and e
for .
Delegates are written in PascalCase.
When declaring delegates, DO add the suffix EventHandler to names of delegates that are used in events.
BAD:
GOOD:
DO add the suffix Callback to names of delegates other than those used as event handlers.
BAD:
GOOD:
Using built.in C# features, such as Action, is encouraged in place of delegates.
In code, acronyms should be treated as words. For example:
BAD:
GOOD:
Prefix event methods with the prefix On.
BAD:
GOOD: