/// <summary>
/// 构造函数
/// </summary>
public SqlDbHelper()
: this(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString)
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="connectionString">数据库连接字符串</param>
public SqlDbHelper(string connectionString)
{
this.connectionString = connectionString;
}
这里面的this(参数),代表的含义是:无参的构造函数继承带参的构造函数