Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 704871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:59:24+00:00 2026-05-14T03:59:24+00:00

I have (for example) Dictionary of different generic types ( d1, d2, d3, d4

  • 0

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 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:59:25+00:00Added an answer on May 14, 2026 at 3:59 am

    You can use List<IDictionary> since Dictionary<K,V> implements IDictionary.

    Alternatively, you could also use either ICollection or IEnumerable since they are also both interfaces implemented by the generic dictionary collection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the next C# code: Dictionary<string, int> d = new Dictionary<string, int>(); d.Add(a,
I have example.org and foo.example.org pointing to the same directory, /var/www/html/ , and want
I have a dictionary containing the character positions of different fields in a string.
I have a base class that has the following property: public virtual Dictionary<String, int>
I have a need for a dictionary with multiple keys of 2 different types
Up until now, I have maintained a 'dictionary' table in my database, for example:
I have an example json as below: { Passwd:String content, Userme:String content } how
I have an example string as follows $string = ' http://image.gsfc.nasa.gov/image/image_launch_a5.jpg http://pierre.chachatelier.fr/programmation/images/mozodojo-original-image.jpg http://image.gsfc.nasa.gov/image/image_launch_a5.jpg Alot
I have a collection of physical parameters associated with different items. For example: Item,
I have the following code: private Dictionary<int, Entity> m_allEntities; private Dictionary<Entity, List<IComponent>> m_entityComponents; public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.