About this snippet
string configPath = this.GetType().Assembly.Location;
var config = ConfigurationManager.OpenExeConfiguration(configPath);
var element = config.AppSettings.Settings["KeyName"];
var configValue = element.Value;
I managed to read some information from the configuration file, but a kind of “Brute Force” was made.
According to my research, it is not highly recommended.
Thank you!