Most people will recommend this one: http://www.icsharpcode.net/TechNotes/
But if you really follow the coding style when you are coding in Visual Studio 2005 environment, you will find that VS 2005 IDE will automatically format your code which is different from the coding style document that I mentioned above. For example, your original code looks like this
try {
...
} catch (Exception e) {
...
}
it will be changed to
try
{
...
}
catch (Exception e)
{
...
}
This is just an example, and I believe you can find many others. (However, you can change this settings in VS2005 by selecting Tools -> Options -> Text Editor -> C# -> Formatting -> New Lines)
I think MS already has a standard style (built in Visual Studio 2005) for how codes should look like, and he only left naming convention for us to play.
PS1: You can also press Ctrl-K + D to format your code manually.
PS2: I found that Microsoft actually has its own Naming Guidelines. Someone already organized well for us, see here.
PS3: There is another good C# Coding Standards wrote by Lance Hunt at here.
No comments:
Post a Comment