private string GetConfigAppSetting(ref System.Configuration.Configuration config, string key)
{
try
{
if (config.AppSettings.Settings[key] != null)
{
return config.AppSettings.Settings[key].Value;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + ex.Source + ex.StackTrace);
}
return string.Empty;
}
温馨提示:答案为网友推荐,仅供参考