How do I load a setting from an external xml file located in the same folder as my program? Or should I be using an old school .ini file? It is only the MySQL server name and a location name that I need to pass to my App.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should look at Application Settings and the ConfigurationManager. You could also use the Connection Strings section in the
app.config.… For AppSettings …
C# Code…
You will need reference
System.ConfigurationApp.Config
… For Connection Strings …
C# Code…
You will need reference
System.ConfigurationApp.Config