Thursday, January 20, 2011

Steps for Resource File in Windows application

Get the Executing assembly
Assembly executingAssembly = Assembly.GetExecutingAssembly()

Path of executing assembly

string assemblyLocation = executingAssembly.Location;
string dirName = Path.GetDirectoryName(assemblyLocation);

Get the path of UI assembly
Assembly UIassembly = Assembly.LoadFile(Path.Combine(dirName, "dllname"));

Initialize the Resource Manager
ResourceManager = new ResourceManager(@"resourcename", UIassembly);

0 comments:

Post a Comment