public
string GetValueFromConfig(string chiave)
{
ExeConfigurationFileMap
fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = @"YourAppFile.exe.config";
Configuration
config = ConfigurationManager.OpenMappedExeConfiguration(fileMap,
ConfigurationUserLevel.None);
AppSettingsSection
app = config.AppSettings;
return
app.Settings[chiave].Value;
}
Nessun commento:
Posta un commento