• C# 私有字段前缀 _ 的设置(VS2019, .editorconfig)


    • 常量和静态只读字段大写
    • 私有字段前缀 _
    #### Naming styles ####
    # Naming rules
    dotnet_naming_rule.const_should_be_all_upper.severity = suggestion
    dotnet_naming_rule.const_should_be_all_upper.symbols = const
    dotnet_naming_rule.const_should_be_all_upper.style = all_upper
    
    dotnet_naming_rule.static_readonly_field_should_be_all_upper.severity = suggestion
    dotnet_naming_rule.static_readonly_field_should_be_all_upper.symbols = static_readonly_field
    dotnet_naming_rule.static_readonly_field_should_be_all_upper.style = all_upper
    
    dotnet_naming_rule.private_or_internal_field_should_be_private_field.severity = suggestion
    dotnet_naming_rule.private_or_internal_field_should_be_private_field.symbols = private_or_internal_field
    dotnet_naming_rule.private_or_internal_field_should_be_private_field.style = private_field
    
    # Symbol specifications
    dotnet_naming_symbols.const.applicable_kinds = field
    dotnet_naming_symbols.const.applicable_accessibilities = *
    dotnet_naming_symbols.const.required_modifiers = const
    
    dotnet_naming_symbols.static_readonly_field.applicable_kinds = field
    dotnet_naming_symbols.static_readonly_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
    dotnet_naming_symbols.static_readonly_field.required_modifiers = readonly, static
    
    dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
    dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
    dotnet_naming_symbols.private_or_internal_field.required_modifiers = 
    
    # Naming styles
    dotnet_naming_style.private_field.required_prefix = _
    dotnet_naming_style.private_field.required_suffix = 
    dotnet_naming_style.private_field.word_separator = 
    dotnet_naming_style.private_field.capitalization = camel_case
    
    dotnet_naming_style.all_upper.required_prefix = 
    dotnet_naming_style.all_upper.required_suffix = 
    dotnet_naming_style.all_upper.word_separator = _
    dotnet_naming_style.all_upper.capitalization = all_upper
  • 相关阅读:
    [bzoj1089] 严格n元树
    [bzoj1097] 旅游景点atr
    [hdu3887] Counting Offspring
    [POJ3321] Apple Tree
    [POJ3635] Full Tank?
    git
    【MySQL】数据的导出导入
    Ubuntu python 开发环境配置
    测试markdown
    约瑟夫环问题-java实现
  • 原文地址:https://www.cnblogs.com/Bob-wei/p/11635528.html
Copyright © 2020-2023  润新知