G
Guest
Hello All:
I have a weird problem in the .netCF version of
System.Resources.ResourceManager.GetString that doesn't occur on the big .NET
Framework.
In a DLL assembly called UtilityClasses, I have a resource file called
strings.resx where I store a bunch of English strings read at runtime. I
load the resource manager as follows:
ResourceManager rm = new ResourceManager("UtilityClasses.strings",
System.Reflection.Assembly.GetExecutingAssembly());
I read a string with
string str = rm.GetString("stringName");
The value of the string read is correct, but the GetString call throws a
FileNotFoundException that is traced in the Visual Studio output window. I
think this has something to do with not specifying the culture but don't know.
This wouldn't be a big deal, except that the code in question is called a
lot and so there is actually a performance hit due to the exception. Anyone
have any idea how to get around this? The same code in a standard (not
..netCF) Windows Forms application does not have this problem.
Robert
I have a weird problem in the .netCF version of
System.Resources.ResourceManager.GetString that doesn't occur on the big .NET
Framework.
In a DLL assembly called UtilityClasses, I have a resource file called
strings.resx where I store a bunch of English strings read at runtime. I
load the resource manager as follows:
ResourceManager rm = new ResourceManager("UtilityClasses.strings",
System.Reflection.Assembly.GetExecutingAssembly());
I read a string with
string str = rm.GetString("stringName");
The value of the string read is correct, but the GetString call throws a
FileNotFoundException that is traced in the Visual Studio output window. I
think this has something to do with not specifying the culture but don't know.
This wouldn't be a big deal, except that the code in question is called a
lot and so there is actually a performance hit due to the exception. Anyone
have any idea how to get around this? The same code in a standard (not
..netCF) Windows Forms application does not have this problem.
Robert