I recently discovered (thanks to a broken build targeting core 2.2) that this is now legal in C# 8
public interface ISimple
{
public string Simon { get; }
}
ISimple is an interface, Simon has no implementation, but the public keyword is allowed.
I understand that public is there for Default Implementations in Interfaces but this property has no implementation.
Compared to this, which is definitely to be expected
public interface ISimple
{
public string Simon => "met a pie man";
}
I doubt this is an oversight; if it's not, what is the rationale for having this? What use could it be?