Is there any connection string parser in C#?

后端 未结 9 893
遥遥无期
遥遥无期 2020-11-28 05:09

I have a connection string and I want to be able to peek out for example \"Data Source\". Is there a parser, or do I have to search the string?

9条回答
  •  遥遥无期
    2020-11-28 06:09

    Use the SqlConnectionStringBuilder Unfortunately you will have to use a DB specific ConnectionStringBuilder as the connection strings differ.

提交回复
热议问题