Using app.config with a class library

后端 未结 9 1344
忘掉有多难
忘掉有多难 2020-11-27 06:47

Frequently I need to create a .Net class library that requires an app.config for things such as database connection strings. However, these settings must be in the calling a

9条回答
  •  日久生厌
    2020-11-27 07:03

    You could create your own XML file(call it appConfig.xml or something if you want), use System.Xml instead of System.Configuration to read it, and include it alongside your dll.

提交回复
热议问题