Search code examples
c#visual-studiocode-formattingeditorconfig

editorconfig - how to specify underscore prefix for readonly private fields?


I haven't been able to find anything on this online.

Is there any way to specify that an underscore prefix for readonly private fields should be added?

Ever since I started using an editorconfig file, Visual Studio will PascalCase the field when I choose the "Introduce read-only field" action.

This is the action I am choosing


Solution

  • The answer here solved my issue, as linked by Sebastian Brunner in the comments:

    https://stackoverflow.com/a/49428349/553609