簡體   English   中英

Visual Studio中的快捷方式可在一行和多行代碼之間切換

[英]Shortcut in Visual Studio to toggle between one and multiple lines of code

在Visual Studio中,以下情況是否存在任何快捷方式?

1)在此之間切換

public int MyProperty
{
   get;
   set;
}

和這個

public int MyProperty { get; set; }


2)在此之間切換

if (number > 0)
{
   number++;
}

和這個

if (number > 0) { number++; }

要格式化代碼,請使用CTRL + E +D。如果需要特殊格式,可以在此位置檢查選項:工具->選項->文本編輯器-> C#->格式設置->新行。 有所有可能的選擇。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM