Replace Data Name with the name of the data you want to store and retreive from the App.Config file, and replace Data Value with the corresponding data for that item. You can add multiple Key lines to store different data, each Data Name should be unique. Next you can use the following code example to read the Data Value from the App.Config file:
var appSettings = ConfigurationManager.AppSettings;
string dataValue = appSettings[“Data Name”];
❗ Note: To use the ConfigurationManager.AppSettings property, you have to add a reference to System.Configuration, otherwise you’ll get an error saying ConfigurationManager Does Not Exist.