[英]Can I make Visual Studio 2017 stop indenting braces for case?
Visual Studio indents braces in case like this:在这种情况下,Visual Studio 会缩进大括号:
switch(variable)
{
case 0:
{
// some code
break;
}
}
However I would like it better without indentation:但是我更喜欢没有缩进:
switch(variable)
{
case 0:
{
// some code
break;
}
}
I was looking through the options, but didn't find the one I want.我正在浏览选项,但没有找到我想要的选项。 Did I miss it or is it just not there?
我是否错过了它,或者它只是不存在?
Under Visual Studio在 Visual Studio 下
Options >> TextEditor >> C# >> Code Style >> Formatting >> Indentation选项 >> 文本编辑器 >> C# >> 代码样式 >> 格式 >> 缩进
is what you are looking for.就是你要找的。 You will see several options under that menu and set your settings as you wish.
您将在该菜单下看到多个选项,并根据需要设置您的设置。 In this case, the setting is called "Indent case contents" .
在这种情况下,该设置称为“缩进大小写内容” 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.