Comment faire une boucle foreach en C # pour le dictionnaire
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);
}