Aug 28th, 2012, 01:27 PM
iterate through a hashtable with multiple values
I have a hashtable with 7 keys, and each key contains an array list.
How do I go about iterating through all the values for each key? Thanks.
Aug 28th, 2012, 04:40 PM
Re: iterate through a hashtable with multiple values
I was able to figure it out by using dictionary instead of hashtable if anyone else has a similar question
Dictionary<string, ArrayList> dictionary = new Dictionary<string, ArrayList>();
for (int i = 0; i < dictionary["Test"].Count; i++)
foreach (KeyValuePair<string, ArrayList> item in dictionary)
if (item.Key == "Test")