Hi,
Thanks ,
You put me on the right track.
Intellisense access to the default Resources is a fully formed name starting
at project Level.
(Project TestResources)
String s =TestResources.Properties.Resources.String1;
Is that little pearl of wisdom documented anywhere?
Are you told that you need "using TestResources.Properties" to make
reasonable use of the Resources object?
Nooo you are not.
Documentation in this area is inadequate in my opinion.
Thanks again for your help.
Bob
"Lasse Vågsæther Karlsen" <la***@vkarlsen.no> wrote in message
news:9d**************************@news.microsoft.c om...
Hi,
I am having trouble with Resources of a windows app.
If I understand correctly.
1) New C# Windows app. Namespace 'TestResources'
2) Edit default Resources file, set String1 value to say "MyApp"
3) Put the following code in ctor after InitializeComponent
ResourceManager rm = new ResourceManager("Resources",
Assembly.GetExecutingAssembly());
String s = rm.GetString("String1");///BREAKS HERE///
MessageBox.Show(s);
It breaks with a MissingManifestResourceException
Am I missing a setting ?
Thanks
Bob
VS2005 produces typesafe access to your resources, at least if you use the
default editors. Try Resources.String1.
--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2