# C# · `CS`

## About the Standards

These standards are based on the C# guidelines suggested by [Aliencube](https://github.com/aliencube/CSharp-Coding-Guidelines), which themselves are based on [Dennis Doomen's Coding Guidelines](https://github.com/dennisdoomen/CSharpGuidelines).

## 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:

* [C# Coding Conventions (C# Programming Guide)](http://msdn.microsoft.com/en-us/library/ff926074.aspx)
* [Framework Design Guidelines](http://msdn.microsoft.com/en-us/library/ms229042.aspx)

In addition to them, this document provides guidelines with the following principles:

* **The Principle of Least Surprise** (or Astonishment) &ndash; 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) &ndash; the simplest solution is more than sufficient.
* **You Ain't Gonna Need It** (YAGNI) &ndash; 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) &ndash; you are encouraged to prevent duplication in your code base without forgetting the [Rule of Three](http://lostechies.com/derickbailey/2012/10/31/abstraction-the-rule-of-three) heuristic.
