Page tree


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Keep your classes/files short, don't exceed 2000 LOC, divide your code up, make structures clearer. Put every class in a separate file and name the file like the class name (with .cs as extension of course). This convention makes things much easier.

IMPORTANT: Indentation

  • Use .editorconfig file :

This feature work natively on Visual Studio only since Visual Studio 2017, else an plugin is available on https://github.com/editorconfig/editorconfig-visualstudio for Visual Studio 2012, 2013, and 2015. 

...

If .editorconfig is enable, you don't need to modify your Visual Studio setting as mentionned below.


  • Set Visual Studio where .editorconfig is not enable :

Setup Visual Studio to use 2 spaces as indentation and use Automatic Formatting regularly

...