Scenario:
Based on locale or other variable select the value of a config.Steps:
- New File -> Resource file [.resx]. It is key value pair file
- In your class add below code:
1 2 3 4 5 6 7 8
private readonly ResourceManager _resourceManager = new ResourceManager( "MyProject.MyApp", Assembly.GetExecutingAssembly()); ... ... var _versionQuery = _resourceManager.GetString(ConfigurationManager.AppSettings["version"]);
No comments:
Post a Comment