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

  • SEARCH
  • Home
  • 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 8430391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:35:08+00:00 2026-06-10T05:35:08+00:00

I have a dictionary as follows: Dictionary<string, dataValues> dataDict = new Dictionary<string, dataValues>(); public

  • 0

I have a dictionary as follows:

Dictionary<string, dataValues> dataDict = new Dictionary<string, dataValues>();

public struct dataValues
    {
        public string Value1;
        public string Value2;
        public string Value3;
        public string Value4;
        public string Value5;
        public string Value6;
        public string Value7;
        public string Value8;
        public string Value9;
        public string Value10;
        public string Value11;
        public string Value12;
        public string Value13;
        public string Value14;
        public string Value15;
        public string Value16;
        public string Value17;
        public string Value18;
        public string Value19;
        public string Value20;
    }

I would like to be able to iterate through all of the string within the dataValues struct by specifying a dictionary key – how could this be accomplished?

  • 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-10T05:35:09+00:00Added an answer on June 10, 2026 at 5:35 am

    From my comment: Use a List<String> instead of those string variables.

    @Tim Schmelter I can’t do, because I need to assign / call specific
    values in a certain order and I can’t do that with a list

    Use the indexer of the collection.

    Dictionary<string, List<string>> dataDict = new Dictionary<string, List<string>>();
    // initialization ...
    String val20OfData1 = dataDict["Data1"][19];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Dictionary<String,String> as follows Dictionary<String, String> MyDict = new Dictionary<String, String>(); and
I have a 'matrix' object like follows: public class Matrix { public Dictionary<string, string>
I have a dictionary as follows: IDictionary<string, string> dict; How to create an enumerator
I have dictionary, like Dictionary<string, bool> accValues = new Dictionary<string, bool>() And I want
When I have a Dictionary<string, int> actual and then create a completely new Dictionary<string,
I have a 2D dictionary as follows dict = {'182.12.17.50': {'185.23.15.69': 30, '175.12.13.14': 14},
I have a class that inherits from a generic dictionary as follows: Class myClass
I have a file (dictionary.txt) with data field entries as follows - ABC This
Simple one to start the day, given a Dictionary<string, string> as follows: var myDict
I have a simple object in the format of class MyObject { public string

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.