Friday, June 20, 2008

Reading resources from resource dll of another application

Copy the Application Dll and Resource dll to one folder.

in the code

Assembly assL = Assembly.LoadFrom(@"C:\Personal\CERT\70-528\MGohil.Services.Authentication.dll");

//here ApplicationTokens is the resource file i.e. ApplicationTokens.resx or ApplicationTokens.en-US.resx
ResourceManager rm = new ResourceManager("MGohil.Services.Authentication.ApplicationTokens", assL);

string t = rm.GetString("XYZ_Key");

No comments: