This project is read-only.

Treat readonly fields as constants or add additional settings


StyleCop has a new rule: 1311 - StaticReadonlyFieldsMustBeginWithUpperCaseLetter. It would be nice if StyleCop+ had corresponding settings. At the moment it seems like readonly doesn't get any special treatment.


Nicholi wrote Aug 2, 2012 at 8:17 PM

Please consider this. Since very often one will be required to use a static readonly (typically private) because the expression is not evaluated at compile time, but is in essence a constant field for the class.

wrote Feb 14, 2013 at 8:16 PM

feafarot wrote Jun 15, 2015 at 5:20 PM

I'm asking to add additional naming rule for Static Readonly fields (public and private both).
Right now I have no way to enable that rule.
So vote +1