I have a basic C background an am experimenting C# for quick Windows development. I am amazed at the sheer simplicity of writing GUIs with Windows.Forms, but now I have stumbled into a question.
I have a program that will parse a text file and populate a ComboBox1 with entries. I also have a second ComboBox which has a fixed list of parameters. Now how can I link the two so that an entry in ComboBox #1 is associated with a specific ComboBox2.SelectedIndex ?
Should I create an array of ComboBox2.SelectedIndexes (that is, an array of integers) for each ComboBox1 entry and then update Combo 2 on ComboBox1.SelectedIndexChanged? I can see that working, but what about if I want to have more parameters ComboBoxes associated to each entry? What are the options to work with this other than this?
In C I think I could use a struct, but I'm not yet confident using classes in C# or whatever the equivalente would be.
Thanks in advance.