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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:12:04+00:00 2026-06-03T12:12:04+00:00

I have Dictionary<string,string> keyValList; its data looks like: <{1} , TEXT NUMBER 1> <{2}

  • 0

I have

Dictionary<string,string> keyValList;

its data looks like:

<"{1}" , "TEXT NUMBER 1">
<"{2}" , "TEXT NUMBER 2">
<"{3}" , "TEXT NUMBER 3">
<"{4}" , "TEXT NUMBER 4">
<"{5}" , "TEXT NUMBER 5">
<"{5}" , "TEXT NUMBER 6">

I have List of objects that has this text in it:

Item item1 = new Item();
item1.Tooltip = "{1}";
item1.Label= "{2}";
item1.Error= "{3}";

Item item2 = new Item();
item2.Tooltip = "{4}";
item2.Label= "{5}";
item2.Error= "{6}";

List<Item> items = new List<Item>();
items.Add(item1);
items.Add(item2);

What is the smartest way to make items(!) look like this:

   item1.Tooltip = "TEXT NUMBER 1";
   item1.Label= "TEXT NUMBER 2";
   item1.Error= "TEXT NUMBER 3";
   item2.Tooltip = "TEXT NUMBER 4";
   item2.Label= "TEXT NUMBER 5";
   item2.Error= "TEXT NUMBER 6";

I am looking in to an efficiant way, because this is just an example, the items and keyValList are bigger.

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-06-03T12:12:13+00:00Added an answer on June 3, 2026 at 12:12 pm

    Why you wanna do that in linq ?

    foreach(Item item in items) {
      item.Tooltip = keyValList[item.Tooltip];
      item.Label = keyValList[item.Label];
      item.Error = keyValList[item.Error];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dictionary that is like this: Dictionary<string, object> myDictionary = new Dictionary<string,
I have a listbox that has its ItemsSource set to a Dictionary(Of String, ColumnMetadata)
I have a Dictionary<string,int> that has the potential to contain upwards of 10+ million
Suppose I have Dictionary like this: Dictionary<string, string> values = new Dictionary<string, string>() {
I have a Dictionary that is declared thusly: Dictionary myDictionary<string, List<FCPort>> = new Dictionary<string,
I have such dictionary Dictionary<string, object> , dictionary holds string keys and objects as
I have a simple Dictionary(of String, Object) that I need to iterate through and
I have dictionary, like Dictionary<string, bool> accValues = new Dictionary<string, bool>() And I want
I have a Dictionary<string, List<Order>> and I want to have the list of keys
I have a Dictionary called AvailableBoxes. I want to lookup a string in this

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.