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 7972631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:55:18+00:00 2026-06-04T07:55:18+00:00

I had planned on using a Dictionary or SortedList for this but as the

  • 0

I had planned on using a Dictionary or SortedList for this but as the project evolved while planning it, I’m not sure what to do.

My site will load a bunch of results from a DB Query and I need to be able to store these results somewhere.

Here’s how the results look like:

What type of Dictionary/List should be used for this?

So, here’s what I am storing:

Result #1 (int) > Name > Value
                > Title > Value
                > Message > Value
                > Date > Value
                > Email > Value

Result #2 (int) > Name > Value
                > Title > Value
                > Message > Value
                > Date > Value
                > Email > Value

Result #3 (int) > Name > Value
                > Title > Value
                > Message > Value
                > Date > Value
                > Email > Value

Result #4 (int) > Name > Value
                > Title > Value
                > Message > Value
                > Date > Value
                > Email > Value

… and so on. My main concern is that most of the Dictionaries and Lists and Sorted/Linked lists cannot have dupliate keys or values. So I can’t use them for this, because each Result will have all the same Key names, like Name, Title, Message, etc. Values may differ, though many of the values such as Name and Date and other ones will be dupes. So I’m kinda stuck with not knowing which kind of Dictionary/List to choose which allows duplicate keys/names and not knowing how to get that ‘one to many’ relationship thing going on so i can store these results properly.

Can someone please help me with what would be the best way to go about this?

  • 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-06-04T07:55:19+00:00Added an answer on June 4, 2026 at 7:55 am

    Do you not just need to create a class like this?

    public class Result
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Title{ get; set; }
        public string Message { get; set; }
        public DateTime Date { get; set; }
        public string Email { get; set; }
    }
    

    Then map your DB results to something like an IList<Result>, or an IDictionary<int, Result> keyed off the Id property?

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

Sidebar

Related Questions

Using Emacs/Magit, I had first a very smooth git experience in another project, but
I am writing a text editor and had planned on using the richtextbox control
I had planned on using an open source SMTP server as a base and
Possible Duplicate: Random number generator not working the way I had planned (C#) I
Possible Duplicate: Random number generator not working the way I had planned (C#) I
Possible Duplicate: Random number generator not working the way I had planned (C#) I
Possible Duplicate: Random number generator not working the way I had planned (C#) I
Possible Duplicate: Random number generator not working the way I had planned (C#) I
Had a good search here but can't see anything that gets my mind in
Had this working; at one stage. The problem is the following text is now

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.