Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save xiaomi7732/ac9e96beeb5be6edaa4697f6cc957cf2 to your computer and use it in GitHub Desktop.

Select an option

Save xiaomi7732/ac9e96beeb5be6edaa4697f6cc957cf2 to your computer and use it in GitHub Desktop.
EditorConfigCheatSheetForUnderScoreReadOnlyField

This is a cheatsheet for generating underscore for readonly field by editorconfig:

[*.{cs,vb}]
dotnet_naming_rule.private_members_with_underscore.symbols  = private_fields
dotnet_naming_rule.private_members_with_underscore.style    = prefix_underscore
dotnet_naming_rule.private_members_with_underscore.severity = suggestion

dotnet_naming_symbols.private_fields.applicable_kinds           = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private

dotnet_naming_style.prefix_underscore.capitalization = camel_case
dotnet_naming_style.prefix_underscore.required_prefix = _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment