1、app.config内增加参数<connectionStrings>

C# 引用项目配置文件app.config

 

   2、添加引用System.Configuration

   3、获取参数字符串

1 string connectstr= ConfigurationManager.ConnectionStrings["SQLConnString"].ConnectionString;

更多参考:https://blog.csdn.net/e295166319/article/details/77839798

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-01
  • 2021-12-30
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
相关资源
相似解决方案