C# read dll config

Configuration myDllConfig =
ConfigurationManager.OpenExeConfiguration(this.GetType().Assembly.Location);
// Get the appSettings section
AppSettingsSection myDllConfigAppSettings =
(AppSettingsSection)myDllConfig.GetSection("appSettings");

string connString = myDllConfigAppSettings.Settings["SQLConnString"].Value;

 

C# read dll config

 

C# read dll config

上一篇:关于webapi跨域问题的一些坑坑


下一篇:刷新ip地址 windows linux系统