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?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 17, 2013, 9:19 PM EST
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.
Sivaraman DhamodaranRank #40 · 34.5K reputationPosted Jan 17, 2013, 11:06 PM EST
The disadvantage is that binary file(.exe,.dll etc) size increases.
You can see a example here