Can we have multiple App.Config files in .NET console application?

后端 未结 2 993
离开以前
离开以前 2020-12-19 01:45

I have a console application that has App.Confile file. Now the parameters that are environment specific are maintained here.

Now I am thinking to h

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-19 02:46

    To follow on from Babak's answer, you could also separate parts of your config out into other config files by using the configSource attribute on any element which represents a ConfigurationSection, e.g.:

    
    

    And in appSettings.config:

    
    
        
    
    

提交回复
热议问题