Solved

How do you retrieve the names of embedded resources

Posted on 2012-03-09
3
338 Views
Last Modified: 2012-03-13
Hello

(Language C#, Visual  Studio 2005)

This is driving me nuts because it is something I've done before but can't recreate. I'm trying to:
1. Get the full path to where the embedded resources are.
2. Get the names of the embedded resource files.

using code-
            System.Reflection.Assembly thisExe =
            System.Reflection.Assembly.GetExecutingAssembly();
            string[] resources = thisExe.GetManifestResourceNames();

Almost gets me the names of everything including:
[programname].Properties.Resources.resources

But I can't retrieve the file names that are contained within the ".resources"

Thanks a lot (and please don't forget about question 1)
0
Comment
Question by:KevinBengo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 37705024
If you have the full resource name, you might be able to use Assembly.GetManifestResourceStream, and use an appropriate stream reader to get the contents.
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 37713599
try this:

System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();

here's a tutorial:
http://hajloo.wordpress.com/2009/12/14/%E2%80%AAhow-to-read-embedded-resource-in-c/
0
 

Author Closing Comment

by:KevinBengo
ID: 37716567
Thanks. It was helpful
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question