We have moved!

You are currently looking at documentation for Umbraco 8 and older versions.
An automated guess is that docs.umbraco.com/umbraco-cms/development-guidelines/coding-standards/ could be the link to the new documentation for Umbraco 9 and newer versions.

    Coding standards and naming conventions

    Coding standards and naming conventions for all languages used in the Umbraco core

    Naming conventions

    HTML & CSS

    • CSS class names will be .lowercase-hyphenated-names
    • HTML IDs will be camelCasedNames

    JavaScript

    • Namespaces: ProperCase/PascalCase
    • Class names: camelCase
    • Method names: camelCase
    • Property names: camelCase
    • Private property names: _camelCase

    File names

    • All file names throughout the solution will be ProperCase/PascalCase - this is extremely important for Visual Studio so that the generated class names follow the correct C# naming conventions
    • However, there is one exception to this rule, in v7 the AngularJs project (Umbraco.Web.UI.Client) all file names need to follow the convention for that project which is that all file names are lowercased

    C#

    When developing new Class libraries we will be adhering as closely as possible to the official guidelines as proposed by Microsoft https://msdn.microsoft.com/en-us/library/ms229042.aspx

    Another good reference is Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries book by Krzysztof Cwalina and Brad Abrams

    Resharper settings are included with the solution, so developers can cleanup code in a consistent manner.