1.先添加引用System.Configuration
2.在app.config中添加命名空间using System.Configuration;
3.获取ConfigurationManager.ConnectionStrings["MyConn"].ToString();
转载于:https://www.cnblogs.com/weiweithe/archive/2006/10/31/545366.html
1.先添加引用System.Configuration
2.在app.config中添加命名空间using System.Configuration;
3.获取ConfigurationManager.ConnectionStrings["MyConn"].ToString();
转载于:https://www.cnblogs.com/weiweithe/archive/2006/10/31/545366.html