I am programming in C# and trying to make a program to write XML with machine settings.
At the moment I use a listed dictionary, but in need to add extra categories.
Situation at the moment:
productlist = new List<Dictionary<string, string>>();
list with different products, dictionary with settings and their values.
But now with categories I need something like:
productlist = new List<Dictionary<string, Dictionary<string, string>>>();
list with different products, dictionary with category and dictionary with settings and their values.
Is this the easiest way to do this? Or can I better use classes (not very experienced with them..)
Edit:
Something like this
Product1:
-Category1
--SettingA with value;
--SettingB with value;
-Category2
--SettingC with value
--SettingD with value
Product2:
-Category1
--SettingA with value;
--SettingB with value;
-Category2
--SettingC with value;
--SettingD with value;
etc.