C# Programming
05-26-2009, 09:11 PM
Visual Studio 2008 / C# / windows application
I have some application settings and would like to iterate through them so that I can put them into a list. So far I have not been able to find a way.
I've tried to use an enumerator
IEnumerator enuEnumerator = Properties.Settings.Default.Properties.GetEnumerator();
while (enuEnumerator.MoveNext())
{
MessageBox.Show(enuEnumerator.Current.ToString());
}
but the string is "System.Configuration.SettingsProperty"
Also, I cannot use an indexer because a string is required raher than a number...
Properties.Settings.Default.Properties[i]
Does anyone know how to do this? http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif
I have some application settings and would like to iterate through them so that I can put them into a list. So far I have not been able to find a way.
I've tried to use an enumerator
IEnumerator enuEnumerator = Properties.Settings.Default.Properties.GetEnumerator();
while (enuEnumerator.MoveNext())
{
MessageBox.Show(enuEnumerator.Current.ToString());
}
but the string is "System.Configuration.SettingsProperty"
Also, I cannot use an indexer because a string is required raher than a number...
Properties.Settings.Default.Properties[i]
Does anyone know how to do this? http://www.barakasoft.com/script/Forums/Images/smiley_confused.gif