c# foreach dictionary index code example
Example 1: c# foreach on a dictionary
foreach(var item in myDictionary)
{
foo(item.Key);
bar(item.Value);
}
Example 2: foreach dictionary c#
foreach(KeyValuePair<string, string> entry in myDictionary)
{
// do something with entry.Value or entry.Key
}