问题
I'd like to make the first letter of private methods lowercase and the first letter of public methods uppercase. However, in Rider there seems to be only one option under C# naming style that applies all methods, properties and events. What is the best way to tell Rider to use a different convention for private only?
(see also: ReSharper C# naming style for private methods and properties, Resharper version of this question)
回答1:
Rider doesn't have UI for cutom naming rules yet, see see RIDER-8339. A possible workaround:
- Open the solution in Visual Studio with ReSharper
- Add a custom naming rule: ReSharper | Options | Code Editing | C# | Naming Style -> Advanced Settings
- Save settings to a team-shared layer
- Open/reopen solution in Rider
来源:https://stackoverflow.com/questions/48104681/jetbrains-rider-c-sharp-naming-style-for-private-methods-and-properties