I'm fairly new to C# and have therfore not much insight on this kind of matter. Google search sadly yielded no help on that.
What actually is the difference between these two files? Which one is more important because they are (almost) identical?
And i have the need to programmically insert keys and values into the config but when i do that they are only insertet into the exe.config but i suppose that if i want to work with them i need them in the app.config, am i right? Everything thats in the config is in the exe.config, except when i add stuff programmically its added in the exe.config and how do i geht the added stuff into the app.config?
This is my code:
countComboBox = ComboBoxVersion.Items.Count;
Configuration config = ConfigurationManager.OpenExeConfiguration(System.IO.Path.Combine(Directory.GetCurrentDirectory(), "UpdatePackager.exe")); //exe path is for the config i suppose
for(int Vcount = 0; Vcount < countComboBox; Vcount++){
config.AppSettings.Settings.Add(ComboBoxVersion.Items[Vcount].ToString() + "-DestinationpathClient" , "DateiPfad");
config.AppSettings.Settings.Add(ComboBoxVersion.Items[Vcount].ToString() + "-DestinationpathUpdatePackages", "DateiPfad");
config.Save(ConfigurationSaveMode.Minimal);
}
LabelSourcepath.Content = SourcepathString;
TextBoxDestinationpathUpdatePackage.Text = DestinationpathUpdatePackagesString;
TextBoxDestinationpathClient.Text = DestinationpathClientString;
I believe i miss something fundamental and would appreciate it if someone could make this clear to me. Regards