"Expand property and add backing field" - Backing field name should match naming rule
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 294
- Avg merge
- 2h 30m
- Merged PRs (30d)
- 4
Description
Visual Studio allows backing fields to be named in a specific manner (Options -> Text Editor -> C# -> Code Style -> Naming -> Specification = Private or Internal field).
When using the "Expand property and add backing field" option, the backing field name should respect the naming convention defined from that menu.
This would match the rename functionality provided by VS itself (IDE1006), and essentially combine the two actions.
example:
Private or Internal field specification is set to Prefix = "m_" with "camel Case Name".
`public Collection MyCollection { get; } = new Collection();`
Use "Expand property and add backing field" action
`private Collection m_myCollection = new Collection();`
`public Collection MyCollection { get { return m_myCollection; } }`
Contributor guide
Assessment
This issue has not been assessed yet.