Coding guidelines

Nov 24, 2011 at 11:45 AM

Here's an initial suggestion for coding guidelines:, so that we don't have to discuss about those on Saturday.

Feel free to comment on them, especially if I've forgotten something you feel is important.

Nov 24, 2011 at 12:58 PM

Thanks Fabian thats great!

One thing though: I don't like the Hungarian notation of private static/constant fields as it is not very common in C# development.

I would suggest the following instead:

  • Private static readonly field names should use PascalCase
  • Private static field names (without readonly) should use _camelCaseWithLeadingUnderscore
  • Private constant names should use PascalCase

What do you think?

Nov 24, 2011 at 2:21 PM

If you agree not to have regions in the file, sure :)

Nov 24, 2011 at 2:57 PM

Deal! :-D

After I have modified my ReSharper settings i will push them right to our code repository. This way violations of coding guidelines get nicely highlighted in Visual Studio :)
If anybody doesn't have ReSharper installed yet, you can download and use it for 30 days free of charge (caveat: it doesn't support Visual Studio Express).

Nov 24, 2011 at 4:10 PM

+1 for no regions

Nov 24, 2011 at 5:25 PM

The new ReSharper 6.1 EAP has a new settings engine that lets you export all your settings in one file. Finally!!!

Nov 24, 2011 at 6:32 PM

Good to know.