First and foremost, generally speaking you should be following best practices for naming conventions (readability, clarity, appropriate and consistent camel & pascal case, etc).
This seemingly depends on whether you're using Micro$hit's LSP or Omnisharp.
Omnisharp
- Open settings
- search/go to:
@ext:ms-dotnettools.csharp omnisharp.Enable Editor Config Support
- Disable this option.
LSP
I'm not entirely certain, since I reverted to Omnisharp the second it stopped being the default, however following other links has lead me to believe this is done by:
In VSCode, go to the far left panel that is right below the File menu.
Click on the Explorer tab.
Right-click a blank area in the Explorer tab and click "New File" in the popup menu.
Name the new file as .editorconfig (With the . at the beginning of the name)
Open .editorconfig, and paste in the following code:
[*.{cs,vb}]
dotnet_analyzer_diagnostic.category-Style.severity = none
dotnet_analyzer_diagnostic.category-CodeQuality.severity = none
- Save the file, restart VSCode, and you are done!
To my understanding, the LSP method should work regardless of which language server is in use.