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

The Archive Base Latest Questions

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

Based on my previous question , it looks like emedded resources are not going

  • 0

Based on my previous question, it looks like emedded resources are not going to work in my project. So plan #2 is to use regular resources via a resx file.

The core of my question is: is it possible to write a function that will take a string key, and return that resource? I tried this with reflection, but I couldn’t get it to work.

Here’s a sample of how I would like it to work. Let’s say I have a Resources.resx file, which has two file resources: MainMap and OverWorld. I would like to write the function that works like:

string mainMapContent = getFromResources("MainMap"); // => returns Resources.MainMap
string overWorldCOntent = getFromResoures("OverWOrld"); // => returns Resources.OverWorld

I tried using reflection to create an instance of the Resources class, but bailed out when I realized the constructor is internal and there’s no empty constructor I can use.

Is there a way to write this getFromResources function? I can’t figure it out.

Note: I will probably put this into a library if I can do it; it needs to work with the Silverlight runtime, too.

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

    The strongly typed resource class that is generated through code-generation is based on the untyped ResourceManager class. You should be able to use ResourceManager.GetObject

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

Sidebar

Related Questions

based my previous question asked here: Jquery Filter List DIVs via checkboxes i got
Based on answer to my previous question, I would like to ask one more
Based on my previous question here and here , I found that I can
Based on a previous question and with a lot of help from Damir Sudarevic
I looked at previous post based on this but they do not relate. I
In previous versions of Xcode creating a window-based, universal application would populate the project
Based on my previous question , I've come up with a better way to
Based on the responses to a previous question , I've created a category on
I'm working on creating build configurations based on a previous question of mine. I've
Based off of a previous question I asked, which @Andrie answered, I have a

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.