How to read the string from .resx file in c#? please send me guidelines . step by step
How to read the string from .resx file in c#? please send me guidelines . step by step
The Simplest Way to get value from resource file. Add Resource file in the project. Now get the string where you want to add like in my case it was text block(SilverLight). No need to add any namespace also.Its working fine in my case
txtStatus.Text = Constants.RefractionUpdateMessage;
Create a resource manager to retrieve resources.
ResourceManager rm = new ResourceManager("param1",Assembly.GetExecutingAssembly());
String str = rm.GetString("param2");
param1 = "AssemblyName.ResourceFolderName.ResourceFileName"
param2 = name of the string to be retrieved from the resource file
This works for me. say you have a strings.resx file with string ok in it. to read it
String varOk = My.Resources.strings.ok
2.return Resource.ResponseMsgSuccess;