TOP KEK
TOP KEK

Reputation: 2651

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 ?

Upvotes: 0

Views: 100

Answers (1)

ionden
ionden

Reputation: 12776

You could test it like this:

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

Upvotes: 3

Related Questions