如果在 ashx 檔案中或者其他不同附檔名的檔案中想要使用 #region 來做程式區段的收合,需要做以下設定:

1)工具>選項
2)左邊選單點選「文字編輯器」的加號打開細項
3)點選「副檔名」
4)加入附檔名 ASHX (或者其他你想要加入的附檔名),並且選取 C# 或 VB 編輯器(或其他)
5)下方「將無副檔名的檔案對應到」勾選,並選取編輯器
6)確定後,將檔案關掉重開即可使用 REGION



英文版:

1- Tools -> option -> select Text Editor.
2- in the right pane add an extension "ashx" and choose from the drop down list which editor u use .. i select microsoft visual c#.
3- in the bottom check on "map extensionless to : the same selection above.
4- click ok and close the ashx page and reopen it.


英文原文網址:這裡
相关文章