JetBrains Rider C# naming style for private methods and properties
Asked Answered
T

1

5

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)

Trevor answered 4/1, 2018 at 22:45 Comment(0)
O
2

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
Opaque answered 21/5, 2018 at 7:42 Comment(1)
rare case where I have rider but no resharper. Other possibilities? Evtl. add something right in settings xml?Gregoriogregorius

© 2022 - 2024 — McMap. All rights reserved.