• 如何读取app.config里的connectionstring节.


    引用

    System.configuration库

    读取代码

        Dim connectionString As System.Configuration.ConnectionStringSettings _
                        = System.Configuration.ConfigurationManager.ConnectionStrings("lily")
            MsgBox(connectionString.ConnectionString)

    App.config配置文件结构

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <connectionStrings>
        <add name="lily" connectionString="server=.;user=sa;pwd=;database=test"/>
      </connectionStrings>
        <system.diagnostics>
     
     
  • 相关阅读:
    List(双向链表)
    Queue(队列)
    Queue(队列)
    Stack(栈)
    Stack(栈)
    Vector(容器)
    gitlab代码库
    Jenkins自动化部署平台
    Maven私服仓库
    VM架构设计文档初稿v0.01
  • 原文地址:https://www.cnblogs.com/zqonline/p/1357569.html
Copyright © 2020-2023  润新知