如何更改花括号的自动格式化位置? [英] How can I change the auto formatting positioning of curly braces?

查看:29
本文介绍了如何更改花括号的自动格式化位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从这里:

if (condition == true)
{
   // do something
}

对此:

if (condition == true) {
   // do something
}

在学校,PC 习惯了第二个,我更喜欢它.以为我的 Visual Studio 会自动使用第一个.我怎样才能改变它?

In School the PC's are used to the second, and I prefer it more. Thought my Visual Studio automaticlly uses the first. How can I change it?

推荐答案

Tools => Options => Text Editor => C#

Tools => Options => Text Editor => C#

有大量选项供您根据需要进行调整.除非您登录较新版本,否则它不会从一个 Visual Studio 维护到另一个.

There's a ton of options in there for you to tweak as you see fit. It won't maintain from one Visual Studio to another unless you're logged in in the newer versions.

我还会用所有语言"打开行号"(在格式下)之类的东西,而不仅仅是 C#.

I would also turn stuff like "Line numbers" (under Formatting) on with "All Languages", and not just C#.

这篇关于如何更改花括号的自动格式化位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆