Visual Studio 2008里,在菜单的Tools->Options...->C#,
General里,把Line numbers打上钩;
Formatting里,
Indentation:
Indent block contents
Indent case contents
这两个打勾,其它不打勾;
Label Indentation选第二个:Place goto labels one indent less than current;
New Lines:
New line options for braces:
Place open brace on new line for types
New line options for expressions:
Place members in object initializers on new line
Place members in anonymous types on new line
Place query expression clauses on new line
以上打勾,其它不打勾;
Spacing:
Set spaceing for method declarations:
Insert space within argument list parentheses
Insert space within empty argument list parentheses
Set spacing for method calls:
Insert space within argument list parentheses
Insert space within empty argument list parentheses
Set other spacing options:
Insert space after keywords in control flow statements
Insert space within parentheses of expressions
Insert space within parentheses of type casts
Insert spaces inside parentheses for control flow statements
Insert space after cast
Set spacing for brackets:
Insert space within empty square brackets
Insert spaces within square brackets
Set spacing for delimiters:
Insert space after colon for base or interface in type declaration
Insert space after comma
Insert space after semicolon in "for" statement
Insert space before colon for base or interface in type declaration
以上打勾,其它不打勾;
Set spacing for operators,选第一个:Insert space before and after binary operators。
在完成以上配置后,按Ok来保存设置。
以后,在C#的代码编辑界面里,按Ctrl+E,D(按着Ctrl的同时依次按下E和D)或者在菜单的Edit->Advanced->Format Document就可以对C#源代码做自动的格式化。
分享到:
相关推荐
。
。
Phalanx 是一个了解 xboard 协议的国际象棋引擎。 它适合初学者和中级玩家(我指望您的帮助使其适合强大的玩家!)
local app_router = require ( " phalanx.router " ): new () local route = require ( " phalanx.route " ) app_router: add ( ' book ' , route: new ( ' ^/book/(%w+) ' , require ( " myapp.controller.book ...
phalanx - 并行哈希替代 (PHA) 是一项提供快速且可移植的并行/多线程消息摘要实用程序和库的计划。
方阵 启用了生物识别功能的应用程序与区块链一起使用,可以核对和验证患者的健康记录。 使用最安全的做法将这些健康记录数字化。
ALEPH阿勒夫Steel Phalanx钢铁方阵钢铁方阵单位档案ISC:追随战士ISC: Myrmidons老兵部队移动力MOV近战CC射击BS体格PH意志W
Phalanx-消除安全港的识别模式Phalanx是NLP注释器的简化流水线,最终以NER注释器书写,该NER注释器写入文本偏移量的输出。 它使用安全港取消标识方法。