how to do a foreach loop in c# for dictionary

C#
foreach (KeyValuePair<string, int> kvp in myDictionary)
{
	print(kvp)
}foreach(var item in myDictionary)
{
  foo(item.Key);
  bar(item.Value);
}
Source

Also in C#: