Common type for generic classes of different types

Posted by DinGODzilla on Stack Overflow See other posts from Stack Overflow or by DinGODzilla
Published on 2010-04-07T21:37:18Z Indexed on 2010/04/07 21:43 UTC
Read the original article Hit count: 150

Filed under:
|
|

I have (for example) Dictionary of different generic types (d1, d2, d3, d4) and I want to store them in something

        var d1 = new Dictionary<int, string>();
        var d2 = new Dictionary<int, long>();
        var d3 = new Dictionary<DateTime, bool>();
        var d4 = new Dictionary<string, object>();


        var something = ???  //new List<object> {d1, d2, d3, d4};

Is there any other way how to store that in something with common denominator different than object?

Thanks :-)

© Stack Overflow or respective owner

Related posts about c#

Related posts about generics