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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:04:03+00:00 2026-05-25T23:04:03+00:00

I have various values and names stored in a db table, that my code

  • 0

I have various values and names stored in a db table, that my code will use for various tasks.

These are read into a kvp , so that I can get to the right value from its key when I need to.

As far as I’ve seen so far, getting to the value using the index of the key is easy, but can I get in via the name of the key instead

kvp["name of key"].value

for instance?

I know any key/values stored in the config files can be accessed as

ConfigurationManager.AppSettings["queryLoadJobDataDetails"]

but as I need to read these values in as I go, adding them to web.config is a bit pointless!

  • 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-25T23:04:04+00:00Added an answer on May 25, 2026 at 11:04 pm

    I’m just Guessing what you need here:

     using System.Collections.Generic;
    
    
     //
     IDictionary<string, object> kvps = new Dictionary<string, object>();
    
     kvps.Add("something", 42);
     kvps.Add("else", "entirely");
    
     object i = kvps["something"];
     string s = kvps["else"] as string;
    

    Also look at TryGetValue:

     object v;
     if (kvps.TryGetValue("missing", ref v))
         Console.WriteLine("Not missing: {0}", v);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have various pieces of generated HTML/JS that I load into Activity with WebView#loadDataWithBaseURL.
I have 13 matrices of various dimensions that i'd like to use in pairwise
I have various objects in application,and each has isvalid method to test if values
I am using Reflections to adjust various values in objects, and I have an
Various online services have different values for maximum year of expiry, when it comes
We have various related session variables for a complex page that has various things
Well, I have a configuration object that contains the settings for various kinds of
I have a list of custom colors that I use in all the UI
I have a primary key that I don't want to auto increment (for various
So I have a Sybase stored proc that takes 1 parameter that's a comma

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.