I'm using VS2017 Community and it just received an update yesterday. Today I wanted to implement an interface and now the implementation looks like this:
public string City
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
Instead of this (what I expected):
public string City { get; set; }
Why this change? Not sure if this is specific to C#7 or VS or whatever. I just know that the auto implementation of interfaces has changed over the last week or so.
My interface:
public interface IMyInterface
{
string City { get; set; }
}
public int City
and later on it ispublic string City
? I.e. you changed from integer to string.=>
, I fail to see what has changed. (I haven't used 2017 yet but in all previous version I've used, when auto implementing an interface all methods and properties throwNotImplementedException
s)