I just deleted my question to reformulate it a better way, this question didn’t really helped me either.
I can assign my user settings this way:
MySolution.Properties.Settings.Default.settingname1 = "mystring1";
MySolution.Properties.Settings.Default.settingname2 = "mystring2";
...
MySolution.Properties.Settings.Default.settingname300 = "mystring300";
To access this setting value, what i can do is
string newstring = MySolution.Properties.Settings.Default.settingname1;
What I want, is being able to access this setting this way, with an index i that varies from 1 to 300, I don’t want to make a loop. I am searching something like:
int i = random.Next(1, 301);
string newstring = MySolution.Properties.Settings.Default.----settingnamei-----
I am pretty sure there is an easy way to do it, I just can’t find it.
thanks for reading
EDIT
Three reasons why I dont like the linked question’s answers:
-I have to go through a 300 iterations foreach loop to find the 1 string I am searching
-This way I can only get DefaultValue and what I want is the actual value of my string
-App settings is not user settings. What I am asking for is to get the values from Settings.cs
Here you go: