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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:37:18+00:00 2026-06-12T21:37:18+00:00

Is there a way to get intellisense for all the keys in a Dictionary<string,string>

  • 0

Is there a way to get intellisense for all the keys in a Dictionary<string,string> in C#?

Or is it possible to get intellisense for a method with a string parameter.

I want to have something like ResourceManager.GetString("") has. and if possible i don’t want to create a static class with constant strings to simulate it.

Edit:

I am currently using a dictionary to combine multiple resource files in to one dictionary, this is done becouse resources are used in multiple projects and need to be overwriten.

var temp = ResourceFile1.ResourceManager
                    .GetResourceSet(CultureInfo.CurrentUICulture, true, true)
                    .Cast<object>()
                    .Select(
                        x => new
                            {
                                ID = 1,
                                Value = x.GetType().GetProperty("Value").GetValue(x, null).ToString(),
                                Key = x.GetType().GetProperty("Key").GetValue(x, null).ToString()
                            });
                temp = temp.Concat(
                    ResourceFile2.ResourceManager
                        .GetResourceSet(CultureInfo.CurrentUICulture, true, true)
                        .Cast<object>()
                        .Select(
                            x => new
                            {
                                ID = 2,
                                Value = x.GetType().GetProperty("Value").GetValue(x, null).ToString(),
                                Key = x.GetType().GetProperty("Key").GetValue(x, null).ToString()
                            }));
                temp = temp.Concat(
                    ResourceFile3.ResourceManager
                        .GetResourceSet(CultureInfo.CurrentUICulture, true, true)
                        .Cast<object>()
                        .Select(
                            x => new
                                {
                                    ID = 3,
                                    Value = x.GetType().GetProperty("Value").GetValue(x, null).ToString(),
                                    Key = x.GetType().GetProperty("Key").GetValue(x, null).ToString()
                                }));
            ResourceDictionary = temp.GroupBy(x => x.Key)
                .Select(x => x.FirstOrDefault(c => c.ID == x.Max(v => v.ID)))
                .ToDictionary(x => x.Key, x => x.Value);
  • 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-12T21:37:19+00:00Added an answer on June 12, 2026 at 9:37 pm

    Don’t use string, but an enum in this case, if you know the finite values.

    By definition, string can contains any value at run-time, while enums are known at compile time.

    Or you can simply avoid the use of a dictionary. If you know that your dictionary will contains always the same keys, you should better create a class with one property per key you previously used.

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

Sidebar

Related Questions

is there way how to get name ov event from Lambda expression like with
Is there any way to get direct URL to a JSF bean action method?
Other than the if(false) hack, is there any way to get Intellisense working in
Is there a way to get intellisense for extension methods from classes that are
Is there any way to get intellisense with razor in VS 2010, I am
Is there any way to get Intellisense in Visual C++ for Visual Studio 2005?
Using VS 2008, or Blend 3, is there any way I can get intellisense
Is there any way to get jQuery Support / Intellisense in T4-Templates? In normal
Is there any way to activate intellisense for xsl:fo documents? Writting all that tags
I have something like this: typedef int customType[10]; And I want a function like

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.