Dan Rigsby – Coding Up Style

Developer.Speaker.Blogger

  • Popular

    C# Coding Standards
  • Categories

    .Net Agile Development Applications C# ClickOnce Common Libraries Community CruiseControl.Net Database Design Patterns Entity Framework Internet Explorer Mix MSBuild MSDN MSDN Forums MSSQL MVP Oslo PDC Personal Podcast REST Software Architecture Tips UI Visual Studio Wcf Webcast Windows Wordpress WPF XNA xslt Zune

  • Archives

    • spacer  2009 (12)
    • spacer  2008 (112)
    • spacer  2007 (5)
    • spacer  2006 (2)
  • spacer
  • Interact

    spacer Subscribe
    spacer

    spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer spacer
  • spacer
    spacer
    spacer
  • Indianapolis

    • Aaron Lerch
    • Chad Campbell
    • Eric Willeke
    • Jason Bean
    • Jeff Moser
    • John Magnabosco
    • Mike Hall
    • Paul Hacker
  • Microsoft

    • Bill Steele
    • Brian Gorbett
    • Brian Prince
    • Dave Bost
    • Jeff Blankenburg
    • Jennifer Marsman
    • Larry Clarkin

Archive for the 'Agile Development' Category

C# Coding Standards

Posted by Dan Rigsby on 16th August 2006

Coding standards have consistantly been a source of pain for developers. Many are reluctant to accept them because they feel that the way the program is just fine. However when working in a agile environment or an environment where developers work on each other’s code, the need for standards becomes more evident. Money and time can be saved if any develper can quickly navigate code, figure out what is going on, and fix bugs.

On my team here at Interactive Intelligence we adopting more and more agile processes. A few months back I took it upon myself to come up with a standards document for our own coding. Everything we do is in C# so I naturally looked for what other people had put together and what Microsoft recommends. The overall goal was not only to make it easy to work on each other’s code more easily, but also to be able to pick up code snippets and samples from Microsoft and other parties and follow along. The end result has been the C# Coding Standards. This document is ever evolving as do most documents of this kind. It not only contains syntax suggestions, but also makes some developement recommendations.

Two of the biggest arguements about the standards doc are the use of tabs over spaces, and the prefix “m_” for private properties. At this time we prefer tabs as they are a symbol used to represent indention vs. other white spaces. As long as everyone follows the standards and sets all tabs to 4 spaces, then almost all of the benifets of using spaces become void. We prefer the prefix “m_” private properties because CLS compliance clearly states that variables can differ by no more than casing, using “camal case for private and pascal case for everything else” is not an option. The use of just a “_” prefix also isn’t CLS complaint.

Download: C# Coding Standards

Posted in Agile Development, C# | No Comments »

 
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.