首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >实现接口包括抛出新的NotImplementedException...为什么?

实现接口包括抛出新的NotImplementedException...为什么?
EN

Stack Overflow用户
提问于 2017-04-18 19:06:44
回答 4查看 7.7K关注 0票数 45

我正在使用VS2017社区,昨天刚刚收到一个更新。今天我想实现一个接口,现在的实现如下所示:

public string City 
{ 
    get => throw new NotImplementedException(); 
    set => throw new NotImplementedException(); 
}

而不是这样(正如我所期望的):

public string City { get; set; }

为什么会有这样的变化?不确定这是特定于C#7还是VS或其他什么。我只知道接口的自动实现在过去一周左右发生了变化。

我的界面:

public interface IMyInterface
{
    string City { get; set; }
}
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43470473

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档