Header

The license header is not optional, every source file should include a license.

Naming conventions

Use easily readable identifier names. For example, a property named HorizontalAlignment is more readable than AlignmentHorizontal.
Use favor readability over brevity. The property name CanScrollHorizontally is better the ScrollableX.
Do not use underscores, hyphens, or any other non-alphanumeric characters.
Do not use Hungarian notation.

Naming case

In the table below are some identifier naming examples, and the right use of letter case in them.
Naming case on MSDN

Code comments

Code should be self explanatory. Methods should contain XML description of method function and, if necessary, complex and ref arguments should be documented in comments.
Core code should contain version number in comments, for keeping track of the changes made. All core code should have revisions by other team members.
Example:
/// <summary>
/// Method checks users username and password
/// </summary>
/// <ver>v1.0.1</ver>
/// <rev>Smith(1.0.0)</rev>
/// <param name="username"></param>
/// <param name="password"></param>
/// <returns>true/false</returns>

Properties

For simple properties, the short form is preferred:
public string Name { get; set; }

For more complex properties use the standard form:
public String Name
{
    get
    {
        if (something)
        {
            return name;
        }
        return null;
    }
    set { value = value; }
}

Methods

Naming should be meaningful and descriptive of what the method does.

Committing changes

All commits must have comments on what is changed.

Last edited Feb 21, 2012 at 8:21 AM by gzuri, version 2

Comments

No comments yet.