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?
  • Ion Todirel

    , androidi wrote

    Example:

    var list = new List<KeyValuePair<string, decimal>>();
    myClass.GenericMethod<typeof(list)>(list);

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

    it's called decltype, and it's awesome, come back to the right side Wink

    C# doesn't have templates, so it wouldn't be that usefult there