{
throw;
}
finally
{
conn.Close();
}
}
.配置
public class DBH
{
private DBH() { }
private static readonly string _DBA = ConfigurationManager.ConnectionStrings["DBA"].ConnectionString;
public static string DBA
{
get { return _DBA; }
}
}
附: configurationManager 需要命名空间 using System.Configuration 和添加引用System.Configuration 双重操作。








