Why is this illegal in C#?
class Foo: Foo.BaseFoo //Circular base class dependency compile time error
{
private class BaseFoo {...}
...
}
I'm not arguing when this could be useful or not, but I'd like to know what are the reasons that would disallow such code to compile. A similar restriction happens with private interfaces.
UPDATE
Seeing that its a duplicate I'll center the question more in why this isn't valid with interfaces which seems more useful?
And, what's more, why does it seem to be legal with the Roslyn preview as shown here