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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:27:18+00:00 2026-05-31T15:27:18+00:00

First off, i’d like to say that my programming knowledge is very basic and

  • 0

First off, i’d like to say that my programming knowledge is very basic and got a learn as you go style. So please bear with me if i sound stupid.

So i have a multi dimensional string array, a part of which is:

X       Y

4,1 Adelaide
4,2 Interlagos
4,3 Sakhir
4,4 Hungaroring
4,5 Estoril
4,6 Barcelona
4,7 Silverstone
4,8 Mugello
4,9 Hockenheim
4,10 Monte Carlo

In the above table, X and Y are the 2 dimensions of the array.

Now i have another string array with elements from X dimension of the above array in unsorted fashion. For example,

4,6
5,15
3,7
10,12

etc…

Now what i want to do is write a code which looks into array #2 and assigns a corresponding element from dimension Y of the array #1.

For example, when the code encounters 4,6 in array #2, i want the code to assign the corresponding value which is Barcelona.

Just the basic snippet or algorithm is what i’m looking for. I’ll do the rest myself.

Thanks in advance!

  • 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-31T15:27:19+00:00Added an answer on May 31, 2026 at 3:27 pm

    Sounds like table 1 should really be a Dictionary<string, string>, mapping “4,6” to “Barcelona”. Then you can just do:

    // However you want to populate your data
    Dictionary<string, string> mapping = ...;
    
    List<string> values = keys.Select(key => mapping[key]).ToList();
    

    Note that this will throw an exception if any of the keys isn’t mapped – if that’s not what you want, please clarify the requirements.

    It’s not clear how you’re getting this data, or whether your “multi-dimensional string array” is a string[,] or a string[][]. If you have to receive it as a string array, give us more details and we can explain how to convert that into the dictionary.

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

Sidebar

Related Questions

First off, I would like to say that I am just starting with PHP
First off I would like to say that I have done ample research on
First off, please accept my apologies if this question is basic, I mainly have
First off, a lil about me, i'm very new to GUI programming, especially with
First off, I'm working on an app that's written such that some of your
First off, let me start off that I am not a .net developer. The
First off, I'm not terribly experienced in XML. I know the very basics of
First off, I will say i've spent 6 hours on this topic and have
First off I apologize if there is another post out there that answers this,
First off, I'm a real beginer at C# so please be gentle. I'm trying

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.