tags:

views:

52

answers:

2

can i add one dictionary object to another dictionary. I mean i am having a check box list whose checked item are being added to a dictionary object by using foreach loop. in the same page i am having some more variable which are added to anther dictionary object now i have two dictionary object which i need to pass to a method but i want to know can i add check box dictionary object to another dictionary object and can be passed to a method and if so then on other end how can i open it back to retrieve the all items.

or other good solution please suggest

+1  A: 

If it is unrelated data, then use two different Dictionaries and pass them separately. Is there a good reason why you would want to only pass one Dictionary? I think KISS applies here.

DavidGouge
yes u are true there is no good reason to do so ,i am passing them separate
NoviceToDotNet
+1  A: 

If you really need to pass them both together just pass a list of them like:

List<Dictionary<int, string>>
ŁukaszW.pl