JetBrains Rider C# naming style for private method

2019-05-18 09:07发布

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)

标签: c# rider
1条回答
看我几分像从前
2楼-- · 2019-05-18 09:35

Rider doesn't have UI for cutom naming rules yet, see see RIDER-8339. A possible workaround:

  1. Open the solution in Visual Studio with ReSharper
  2. Add a custom naming rule: ReSharper | Options | Code Editing | C# | Naming Style -> Advanced Settings
  3. Save settings to a team-shared layer
  4. Open/reopen solution in Rider
查看更多
登录 后发表回答