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.Reso urces.String1;
Is that little pearl of wisdom documented anywhere?
Are you told that you need "using TestResources.P roperties" 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.micros oft.com...
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 InitializeCompo nent
ResourceManager rm = new ResourceManager ("Resources" ,
Assembly.GetExe cutingAssembly( ));
String s = rm.GetString("S tring1");///BREAKS HERE///
MessageBox.Show (s);
It breaks with a MissingManifest ResourceExcepti on
Am I missing a setting ?
Thanks
Bob
VS2005 produces typesafe access to your resources, at least if you use the
default editors. Try Resources.Strin g1.
--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vk arlsen.no
PGP KeyID: 0x2A42A1C2