Coffeehouse Post

Single Post Permalink

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

    Maddus Mattus said:
    Massif said:

    I hate var's


    they are for lazy programmers Smiley


    and worker.DoWork() would not be possible, because DoWork has a return type. Ignoring the return is not 'first class' as Erik would call it Smiley

    Or of course:


    ojbect thing = worker.DoWork();


    And, if you have a class A which inherits from B which inherits from C (and DoWork implementations returning As and Bs) what does:


    C wtf = worker.DoWork();


    Resolve as? It'd just be too confusing for us humble programmers.


    And I'm not letting you take away my god-given right to ignore return values! Big Smile