This document may be read as a guide to writing robust and reliable programs. It focuses on programs written in C#, but many of the rules and principles are useful even if you write in another programming language.

2 File Organization
2.1 C# Sourcefiles
Keep your classes/files short, don’t exceed 2000 LOC, divide your code up, make structures clearer. Put every class in a separate file and name the file like the class name (with .cs as extension of course). This convention makes things much easier.
2.2 Directory Layout
Create a directory for every namespace. (For MyProject.TestSuite.TestTier use MyProject/ TestSuite/TestTier as the path, do not use the namespace name with dots.) This makes it easier to map namespaces to the directory layout.
Read the rest of this entry »