c# for in dictionary code example
Example 1: iterate through dictionary c#
foreach(var item in myDictionary)
{
foo(item.Key);
bar(item.Value);
}
Example 2: c# dictionaries
IDictionary<int, string> dict = new Dictionary<int, string>();
//or
Dictionary<int, string> dict = new Dictionary<int, string>();