foreach (KeyValuePair<string, int> kvp in myDictionary)
{
print(kvp)
}
foreach(var item in myDictionary)
{
foo(item.Key);
bar(item.Value);
}
foreach(KeyValuePair<string, string> entry in myDictionary)
{
// do something with entry.Value or entry.Key
}
//for unity
foreach (var keyValuePair in myDictionary)
{
ValueClass myValue = keyValuePair.Value;
Debug.Log(myValue);
}
foreach(var item in myDictionary.Keys)
{
foo(item);
}
foreach(var item in myDictionary.Values)
{
foo(item);
}