Coming Clean

Revelation in Progess

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 */
}

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>