dotnet / dotnet/docs

How to exclude modifier

Open
#23,379 2 comments 0 reactions 0 assignees View on GitHub
dotnet-fundamentals/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

While the page has very useful information, I was unable to find how to exclude certain modifier from a naming rule. For example, I want to do camelCase for private fields, but not for private static readonly fields. So I would need to exclude **static** and **readonly** from the rule but I'm unable to do so. If you can add some example for this scenario, that would be great.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: e8c8357d-11a6-6f12-b044-5ff44df65d10
* Version Independent ID: 0c103fd7-5cc4-2726-40f8-d759419ae635
* Content: [.NET code style rule options - .NET](https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options)
* Content Source: [docs/fundamentals/code-analysis/code-style-rule-options.md](https://github.com/dotnet/docs/blob/main/docs/fundamentals/code-analysis/code-style-rule-options.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @gewarren
* Microsoft Alias: **gewarren**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.