Closed bkoelman closed 3 years ago
And it clashes a little bit with the rule below:
Prefer language syntax over explicit calls to underlying implementations (AV2202)
Ironically, I've never used String.Parse
. Only string.Parse
. So I'm fine to change it.
The current rule is worded:
So the rule currently prefers
Int32.Parse()
overint.Parse()
, which is the opposite of the .editorconfig default and this StyleCop rule. The C# ECMA spec used to advocate forint.Parse()
overInt32.Parse()
, but that guidance was removed in later versions.The last line of the exception must be kept for CLS compliance, but as far as I know the static member access is just a matter of taste without any technical consequences.
There is nothing wrong with having this preference in itself, but I thought I'd bring it up for reconsideration.