【发布时间】:2015-09-02 22:43:02
【问题描述】:
我正在尝试让 Visual Studio 2015 (14.0) 在使用 C# 重构实现接口时使用自动属性。
即我想要这个;
public object SomeProperty { get; set; }
与此相反;
public object SomeProperty
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
我在过去版本的 Visual Studio 中通过编辑代码 sn-p 文件(指令 here)完成了此操作,但使用 Visual Studio 2015 无法使其工作。
【问题讨论】:
-
我也做不到。我已经更改了我的 propertyStub.sn-p 但它没有注册更改。你解决了吗?
-
不,看起来还没有解决方案。如果我有时间,我可能会为自己做一个扩展。
-
谢谢@labilbe。我想我很久以前就发现了这个。令人失望,但希望将来会有解决方法或实施。
标签: c# visual-studio ide refactoring visual-studio-2015