2017-08-30 18 views
0

只有當我使用「快速操作和重構...」生成類時纔會發生這種情況。例如,當我右鍵單擊單詞Model並選擇「Quick Actions and Refactorings ...」,然後單擊「在新文件中生成類模型」時,這就是創建的Model.cs文件的樣子:Visual Studio 2015未插入通過快速重構生成類時使用指令

namespace MyApp 
{ 
    internal class Model 
    { 
    } 
} 

我在期待Visual Studio會自動添加using指令,如using System; using System.Collections.Generic; using System.Linq; using System.Text;。如果我使用Add-> New Item添加類,則不會發生這種情況。 我已經檢查了工具 - >選項,但無濟於事。感謝任何幫助。謝謝,

+1

JetBrains的[ReSharper的](http://www.jetbrains.com/resharper/)FTW! –

回答

相關問題