|
-
September 5th, 2002, 04:32 AM
#1
Reading resources from an Assembly
Hello.
I have a nice project with a resourcefile MyProject.resx
I add a string to the resource like this:
ResXResourceWriter reswriter = new ResXResourceWriter( "MyProject.resx");
reswriter.AddResource("myhappystring", "HaHaHaHaHa");
reswriter.Generate();
reswriter.Close();
Very nice. When I compile the project I can find the string in the dll binary code, so I assume it is in the assembly.
Now I want to get the string from the assembly...
Assembly theAssembly = Assembly.LoadFrom( "MyProject.dll" );
ResourceManager manager = new ResourceManager("MyProject", theAssembly);
manager.GetString("myhappystring");
This does not work...
Does anyone know how to get this string back out of my assembly?
Greets,
Arthur
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|