Skip to content

Instantly share code, notes, and snippets.

@abdurrahman
Last active August 6, 2018 22:09
Show Gist options
  • Save abdurrahman/30216633b68f97cb1d3379324b416271 to your computer and use it in GitHub Desktop.
Save abdurrahman/30216633b68f97cb1d3379324b416271 to your computer and use it in GitHub Desktop.
A C# Style Guide

We can follow this document for CSharp coding standards.

Additionally our default editorconfig file must be update with below settings.

[*.cs]
indent_size = 4
end_of_line = crlf
  • Further more this article might be useful for EditorConfig file
  • Another well explained article that you can add more config

VS 2017

.editorconfig file is supported since Visual Studio 2017. You can follow this instruction for how to make style guide configuration. After changes or creating .editorconfig file first time, use this key combination(CTRL-K, CTRL-D) or Edit > Advanced > Format Document for seeing config result on your *.cs file.

VS Code

You can install EditorConfig extension from MarketPlace for VS Code. This plugin attempts to override user/workspace settings with settings found in .editorconfig files. Now you can add easily config file in your root project directory.

Tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment