Search code examples
c#.netapplication-settings

Access application setting by name


In application settings I have a group of settings called "Name01", "Name02" and so on.

I have a list of strings "Name01", "Name16", "NameWhatever"..

How to check if there is a setting called "NameXX" in Settings.Default ?


Solution

  • You could test it like this:

    var x = Properties.Settings.Default.Properties["NameXX"];
    if(x != null) {
     //....
    }