zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    根据前序遍历和中序遍历重建二叉树
    Java内部类
    Java浅克隆和深度克隆
    【leetcode】1354. Construct Target Array With Multiple Sums
    【leetcode】1352. Product of the Last K Numbers
    【leetcode】1351. Count Negative Numbers in a Sorted Matrix
    【leetcode】1342. Number of Steps to Reduce a Number to Zero
    【leetcode】1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
    【leetcode】1344. Angle Between Hands of a Clock
    【leetcode】1346. Check If N and Its Double Exist
  • 原文地址:https://www.cnblogs.com/Bob-wei/p/11635528.html
Copyright © 2011-2022 走看看