C# – Why Can’t You Deal with PolyMorphism?
interface Foo
{
}
interface Bar : Foo /* Bar is a Foo */
{
}
interface A
{
Foo getFoo();
}
interface B : A /* B is an A */
{
Bar getFoo(); /* C# thinks this is a bad thing */
}
interface Foo
{
}
interface Bar : Foo /* Bar is a Foo */
{
}
interface A
{
Foo getFoo();
}
interface B : A /* B is an A */
{
Bar getFoo(); /* C# thinks this is a bad thing */
}