I usually add an m_
in front of private
fields and an s_
before static
members.
With a code like
protected static readonly Random s_Random = new Random ();
I get the following warnings by VS2008's Code Analysis:
CA1709
: Microsoft.Naming : Correct the casing of 's' in member name 'Bar.s_Random' by changing it to 'S'.CA1707
: Microsoft.Naming : Remove the underscores from member name 'Bar.s_Random'.
How to resolve this issue? Should I simply remove the s_
? Or add a global suppression for this warning?
Edit: My company lacks coding standards, so it's up to me to define them for my code. (Yea I know...)
If you think s_
should be removed in general, I'd be glad if you could provide official sources.