Tech Off Post

Single Post Permalink

View Thread: What's the name of this (lacking?) C# language feature and why isn't it possible or is it?
  • User profile image
    Sven Groot

    , androidi wrote


    var list = new List<KeyValuePair<string, decimal>>();

    I'm pretty sure C++11 had something like this, why doesn't C# have it?

    I'm not sure what's going on here. You can just use this:


    The generic argument will be inferred from the type of list if not specified.