Jak zrobić pętlę foreach w C# dla słownika
foreach (KeyValuePair<string, int> kvp in myDictionary)
{
print(kvp)
}
Magnificent Mamba
foreach (KeyValuePair<string, int> kvp in myDictionary)
{
print(kvp)
}
foreach(var item in myDictionary)
{
foo(item.Key);
bar(item.Value);
}
foreach (KeyValuePair item in myDictionary)
{
MessageBox.Show(item.Key + " " + item.Value);
}