I can't find a good solid example on how to access strings from a resource
file.
I know i need to create a ResourceManager object, and then call the
GetString method on it. My problem is that if i try to access anything from
a resource file other than one of the ones connected with a Form, it can
never find it.
So can someone just point me in the right direction with this...
I add an Assembly Resource File called MyStrings.resx to my project.
I then go in and add in a couple lines to the resource file such as
StringA, This is my StringA, null, null, null
StringB, This is my StringB, null, null, null
now, if i want to pull one of these strings from a function in any class in
my assembly, how do i go about doing it?
System.Resources.ResourceManager resources = new
System.Resources.ResourceManager(???);
resources.GetString(???)
Thanks in advance for the clarification!
Tim 1 8959
nevermind, i figured it out.
"Tim Mulholland" <Mu***************@alumni.virginia.edu> wrote in message
news:u5**************@TK2MSFTNGP11.phx.gbl... I can't find a good solid example on how to access strings from a resource file. I know i need to create a ResourceManager object, and then call the GetString method on it. My problem is that if i try to access anything
from a resource file other than one of the ones connected with a Form, it can never find it. So can someone just point me in the right direction with this...
I add an Assembly Resource File called MyStrings.resx to my project. I then go in and add in a couple lines to the resource file such as
StringA, This is my StringA, null, null, null StringB, This is my StringB, null, null, null
now, if i want to pull one of these strings from a function in any class
in my assembly, how do i go about doing it?
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(???); resources.GetString(???)
Thanks in advance for the clarification!
Tim
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ajdfljsdf |
last post by:
After some basic research, I am still somewhat unclear on how Access would
be used in a workgroup setting. Basically, we want to run 10 MS Access
clients to access an MS Access database on a...
|
by: Marc Nadeau |
last post by:
Hi, I have a new project that consist of transfering a JD Edwards
Database to an MS Access database. I am just starting to learn how
those 2 databases works. What is the general idea behind...
|
by: ASP.Confused |
last post by:
The old message looked a little stale, so I am re-posting it here. Anybody
have any ideas of what I could do?!? The previous responses to this
question are below. If you want to look at the...
|
by: Bruce |
last post by:
I am developing an ASP.NET web service application. It works fine on my
WinXP Prof development machine. But when I send it to a Windows Server 2003
system I get the following error (attached...
|
by: Steve Franks |
last post by:
I'd like to set up a certain part of my web tree so that no browsers can
access files from that directory and any directories below it. I will store
certain resouces like xml files and other...
|
by: M |
last post by:
I installed the Visual Basic .NET Resource Kit.
When I click 'Visual Basic .NET Resource Kit'
the page
at 'http://localhost/VB.NETResourceKit/Welcome.aspx'
show:
Server Error in...
|
by: Sarah |
last post by:
I need to access some data on a server. I can access it directly using UNC
(i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network
drive resource (S:\Path\FileName).
Here is my...
|
by: joshtichauer |
last post by:
So i have an xml file, i'm grabbing it via dataset, then placing the
data into a datagrid. everythings all good, but i'd like to edit the
data. the coding grabs whats in the edit textboxes, and...
|
by: Anbu |
last post by:
Hi all,
I have developed an application in VS .NET 2003 (framework 1.1) on a XP
platform. It is working fine in that PC.
Now, I setup new PC with same configuration for another develper....
|
by: carson |
last post by:
I have written two windows services:
- service A does some crunching of local data files and uploads them to
a central processing computer via http.
- service B monitors a manifest file on a...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
| |