C# · CS
About the Standards
These standards are based on the C# guidelines suggested by Aliencube, which themselves are based on Dennis Doomen’s Coding Guidelines.
Basic Principles
In general, because these standards cannot cover everything for each application’s purpose, these two documents provided by Microsoft are the main starting points:
In addition to them, this document provides guidelines with the following principles:
- The Principle of Least Surprise (or Astonishment) – you should choose a solution that does not include any things people might not understand, or might put them on the wrong track.
- Keep It Simple Stupid (KISS) – the simplest solution is more than sufficient.
- You Ain’t Gonna Need It (YAGNI) – you should create a solution for the current problem rather than the ones you think will happen later on (since when can you predict the future?).
- Don’t Repeat Yourself (DRY) – you are encouraged to prevent duplication in your code base without forgetting the Rule of Three heuristic.