[英]How do I make property accessors all on one line, including closing braces, in Visual Studio 2017, both when authoring and refactoring?
[英]Can I make Visual Studio 2017 stop indenting braces for case?
在这种情况下,Visual Studio 会缩进大括号:
switch(variable)
{
case 0:
{
// some code
break;
}
}
但是我更喜欢没有缩进:
switch(variable)
{
case 0:
{
// some code
break;
}
}
我正在浏览选项,但没有找到我想要的选项。 我是否错过了它,或者它只是不存在?
在 Visual Studio 下
选项 >> 文本编辑器 >> C# >> 代码样式 >> 格式 >> 缩进
就是你要找的。 您将在该菜单下看到多个选项,并根据需要设置您的设置。 在这种情况下,该设置称为“缩进大小写内容” 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.