如何更改 Visual Studio 中的默认括号格式

Dan*_*lco 4 code-formatting visual-studio

大家好,我是 C# 和 VisualStudio 的新手,我想更改默认格式样式:

 void Start()
 {
        
 }
Run Code Online (Sandbox Code Playgroud)

对此:

 void Start() {

 }    

Run Code Online (Sandbox Code Playgroud)

是否可以?有人知道该怎么做吗?

小智 5

Tools -> Options -> Text Editor -> C# -> Code Style -> Formatting-> New Lines

您需要删除此处对所有选项的选中,以免将左括号放在新行上。