how to use resource file in windows form application?
how to use resouce file in .net and what key benefits it gives to the developer?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sivaraman DhamodaranPosted Jan 18, 2013, 4:06 AM
The disadvantage is that binary file(.exe,.dll etc) size increases.
You can see a example here
Jignesh TrivediPosted Jan 18, 2013, 2:19 AM
try following code retrieve string from Resource file.
System.Resources.ResourceManager rm = new System.Resources.ResourceManager("nameofResourcefile", System.Reflection.Assembly.GetExecutingAssembly());
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("en-US");
rm.GetString("someString", ci);
Key benifit
Resource files give you an easy way to localize/internationalize in .net applications.
Resource files give you a central location to store your strings, files and scripts and refer to them in a strongly-typed manner.
Resource files can be compiled into satellite assemblies, making it easy to change up the resources in a production application without having to recompile the whole thing.
hope this will help you.