Coffeehouse Post

Single Post Permalink

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

    Well what would

     

    var whatAmI = worker.DoWork();

     

    Do? and of course what would:

     

    worker.DoWork();

     

    Do when we don't care about the return?

     

    I also don't like it because it doesn't seem properly polymorphic to me, as the return type is clearly related to what the function does, and now the identically named functions are clearly doing something different. But that's just me.