How to use a App.config file in WPF applications?

前端 未结 8 2223
既然无缘
既然无缘 2020-12-04 13:59

I created an App.config file in my WPF application:


         


        
8条回答
  •  一向
    一向 (楼主)
    2020-12-04 14:29

    In your app.config, change your appsetting to:

    
        
            
                c:\testdata.xml
            
        
    
    

    Then, in the code-behind:

    string xmlDataDirectory = WpfApplication1.Properties.Settings.Default.appsetting.ToString()
    

提交回复
热议问题