i am developing an application in which i add controls during runtime and to keep track of these controls i am maintaing separate hashtables so that it will be easy for me to do what ever i want with them later. But I am having around 6 hashtables and maintaining these is a little complex. So i was wondering whether i can have all these controls in to one data structure but it should be easy for me to identify them just like i do in hashtable. Basically what i want is an extended version of hashtable where i can add multiple values to one key. For example what i have now is
hashtable addButtons = new hashtable();
hashtable remButtons = new hashtable();
addButtons.add(name,b);
remButtons.add(name,r);
Now it would be cool if i can do something like
addButtons.add(name=>(b,r,etc,etc));
and then get any of it just like in hashtable like
addButtons[name][1]
Can any one tell me if something like this is possible in c#.
I would have a class representing the 6 things…
and a
Dictionary<string,SomeType>– then you can:and