111,120
社区成员
发帖
与我相关
我的任务
分享
connectionString = ServerSetting.ServerDbConStrForServer;
public static string ServerDbConStrForServer
{
get
{
return ServerDbConStrByOrg();
}
}
private static string ServerDbConStrByOrg()
{
string str = ConfigurationSettings.AppSettings["ServerDbConStr"];
return str;
}
public sealed class ConfigurationSettings
{
// Methods
private ConfigurationSettings()
{
}
[Obsolete("This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection")]
public static object GetConfig(string sectionName)
{
return ConfigurationManager.GetSection(sectionName);
}
// Properties
[Obsolete("This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings")]
public static NameValueCollection AppSettings
{
get
{
return ConfigurationManager.AppSettings;
}
}
}