Coffeehouse Post

Single Post Permalink

View Thread: Why does C# not support this?
  • User profile image
    Massif

    Minh said:
    Maddus Mattus said:
    *snip*

    What if I had this really common scenario?

     

    class Chicken { }

    class Hen : Chicken { }

    class Rooster : Chicken { }

     

    List<Chicken> roster = new List<Chicken>();

     

    roster.Add(DoWork());

     

    That was going to be my next question Smiley

     

    And for all that breakage and confusion, what does it get you really?