我以前从未使用过"appSettings"。在C#中如何配置它以便与SqlConnection一起使用?我目前用的是“ConnectionStrings”
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
这就是我对"appSettings"所拥有的内容
SqlConnection con = new SqlConnection();
con = ConfigurationManager.AppSettings("ConnectionString");
但它没有起作用。