-
Notifications
You must be signed in to change notification settings - Fork 12
Coding standards
The following are the adopted coding standards:
-
First and foremost, follow the established patterns you see in the existing code base. Don’t invent your own patterns!
-
See http://www.dotnetspider.com/tutorials/CodingStandards.doc
-
Follow items 1 through 11 in section 7. Naming Conventions and Standards.
-
Regarding TAB vs Spaces, use 4 spaces instead of a tab. In Visual Studio, under Tools->Options, Text Editor, C#, Tabs, set your Tab size and Indent size to 4 and radio option to "Insert spaces".

-
Other C# "Spacing" Settings
Check both 'Insert space within argument list parenthesis' options
three other spacing options
four more spacing for delimiter options -
Use the Organize Usings | Remove and Sort tool when editing your cs files. Sort them putting 'System' directives first. Turn this option on in Visual Studio, under Tools->Options, Text Editor, C#, Advanced, and enable "Place 'System' directives first when sorting usings"

-
Use GhostDoc
Download GhostDoc from http://submain.com/download/ghostdoc/. Enter your email address and click "Download GhostDoc". Just use the default settings when installing. Now that it is installed, use it to document methods, classes, properties, etc. It is OK to just leave the default comments that it generates. At a minimum, it is nice to get rid of the compiler warnings due to wrong or missing XML comments.
Tip: Use the keyboard shortcut Ctrl-Shift-D for quickest usage.
Read the Git Branching Strategy page to follow our branching standard convention.
Read the JavaScript Coding Standards page to get up to speed on what we like to see on the front-end.