473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to use ResourceReader?

I have namespace called "DataTransfer" inside of which I have a class called
"DataXfer". And also in this namespace I have a resource file called
"CabList.resx".

If I want to load a known resource then I can use this code:

ResourceManager resMgr = new ResourceManager("DataTransfer.CabList",
typeof(DataXfer).Assembly);
string txt = resMgr.GetString("abc");
But what I can't figure out is how to load the collection of resources in
this file if I don't know their name ahead of time. I followed some code I
found here:
http://msdn.microsoft.com/library/de...classtopic.asp
and tried this code:

IResourceReader reader = new ResourceReader("CabList.resx");
IDictionaryEnumerator en = reader.GetEnumerator();

But it didn't work. In fact, I tried every different form of this I could
think of but can't get it to work.

And I don't necessarily have to use ResourceReader! Just trying to find a
way to do what I described above.

--
Robert W.
Vancouver, BC
www.mwtech.com

Nov 17 '05 #1
0 1368

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steve Guidi | last post by:
Hello, I'm developing an application that periodically reads embedded assembly resources. The resources are text-based, and are about 3-7KB in size, and the application accesses them by calling...
5
by: Code Guy | last post by:
Hello, I am trying to execute the following code: private void button1_Click(object sender, System.EventArgs e) { PictureBox c = new PictureBox(); c.BorderStyle = BorderStyle.FixedSingle;...
3
by: Saradhi | last post by:
How to get the names of all the Resources embedded in a Resource File? -SARADHI
3
by: J.Marsch | last post by:
Hello all: I am trying to build a resource dll that will house icons, and I'm afraid that I'm not having much luck reading it. Can you lend hand (or just point me to a good primer). Here's...
2
by: Daniel Groh | last post by:
This line: Line 40: ResourceReader objResReader = new ResourceReader(Server.MapPath("Resources/resTitles.resx")); Error: Stream is not a valid resource file. What could it be ? =/ Daniel
8
by: Reuben | last post by:
I have recently been trying to add some bitmaps to my Managed C++ app as resources. However, I have found that the availible documentation on this only covers C# and that the C++ IDE does not...
9
by: Frank1213 | last post by:
In my ASP.NET application, we are noticing appreciable memory leaks and the main culprit appears to be System.String We use ResourceReader to read in a resource file and we close and dispose the...
1
by: Rune B | last post by:
Hi Group the System.Resources.ResourceReader does apparently not read the resx files from the 'App_LocalResources' folder.. does anybody know where to look for a library (or namespace) to start...
0
by: Bhavini | last post by:
Hi all, I have to implement localization in asp.net application using .resx files, but I have to read and modify these .resx files at runtime, I used ResourceReader class to read that file but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.