![](/img/trans.png)
[英]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.