Armin, most sources don't use ThisNotationAtAll.
You can do what you want but consistency will make you feel more at
home. Probably the most widely used and my personal favourite is
CONSTANT_NAME_IN_CAPITALS_WITH_UNDERSCORE.
This also provides more consistency than Armins approach as well since
as Microsoft use this convention and the library defines thousands of
constants in this fashion.
Maybe in c header files for Win32 constants, but not for
..Net, as far as I know.
From
http://www.irritatedvowel.com/Programming/Standards.aspx
"Same naming conventions as public/private member variables or
procedure variables of the same scope. If exposed publicly from a
class, use PascalCase. If private to a function/sub, use camelCase..
Do not use SCREAMING_CAPS
Why: This convention is consistent with the .NET Framework and is easy
to read. A sizable section of the Framework Design Guidelines is
dedicated to why they chose not to go the SCREAMING_CAPS route. Using
SCREAMING_CAPS also exposes more of the implementation than is
necessary. Why should a consumer need to know if you have an enum, or
(perhaps because they are strings) a class exposing public constants?
In the end, you often want to treat them the same way, and black-box
the implementation. This convention satisfies that criteria."
And here it is straight from the source:
http://blogs.msdn.com/brada/archive/2004/02/03/67024.aspx
"We used the term SCREAMING CAPS to indicate an all upper case style.
Luckily this style (and name) did not survive in the final guideline."
If you like SCREAMING CAPS, go ahead, but you are violating the
official guidelines, even if you think otherwise.
You will find a bunch of them in places like
System.Drawing.NativeMethods,
but that is because they were ported from Win32.
Can you point me to a place in the framework where I can find a large
collection of .Net-originated constants that use SCREAMING CAPS(?)
Regards,
Joergen Bech