loop through all keys in dictionary c# code example
Example 1: iterate through dictionary c#
foreach(var item in myDictionary)
{
foo(item.Key);
bar(item.Value);
}
Example 2: .net loop through dictionary
foreach (KeyValuePair item in myDictionary)
{
MessageBox.Show(item.Key + " " + item.Value);
}