Hello everybody,
I write a program to treat pictures that can be stored in a variable number of folders.
The paths to the folders are stored in the properties settings, in user scope.
So, when loading the form I launch this :
List<string> LFldrs = new List<string>();
SettingsPropertyCollection collection = Properties.Settings.Default.Properties;
foreach(SettingsProperty sp in collection)
{
if(sp.Name.StartsWith("Path"))
{
LFldrs.Add(sp.DefaultValue.ToString());
}
}
Well, OK I have my folders in a List, but they are ordered Path2, Path1, Path4, Path3 (and the order of creation is Path1, Path2, Path3, Path4).
OK I could put sp.Name in an OrderedList, and then access the settings by name, but I feel I missed something, no ?