ReSharper C# naming style for private methods and

2020-07-02 22:29发布

问题:

I like to make the first letter of private methods, properties and events lowercase and the first letter of public methods, properties and events uppercase. However, in ReSharper 7.1 there is only one option under C# naming style that applies all methods, properties and events. What is the best way to tell ReSharper to use a different convention for private only?

回答1:

You can create your own Naming Style Rule.

Resharper Options => Code Editing => [Language] => Naming Style => Advanced Options => +Add...

Verified that the requested functionality is possible using this option.