I am trying the new features of C#8 and i have come to this problem. Having an interface with a default implementation method , i am defining a derived class that calls the said method inside it (constructor or proprietary method). Why am i not able to see the interface method ?
Interface with default implementation method
interface IA{
public void DoStuff()
{
}
}
Derived class that should contain interface method
class A:IA
{
public void DoSomeOtherStuff()
{
this.//DoStuff() does not exist !!!
// I could write like below but it beats the purpose
// IA a=this;
// a.DoStuff()
}
}
My question is , why isn't this
treated as abiding to the interface contract? Why does it not have access to the default impl method ?