snippetcsharpCritical
How to iterate over a dictionary?
Viewed 0 times
iteratehowoverdictionary
Problem
I've seen a few different ways to iterate over a dictionary in C#. Is there a standard way?
Solution
foreach(KeyValuePair entry in myDictionary)
{
// do something with entry.Value or entry.Key
}
Context
Stack Overflow Q#141088, score: 4597
Revisions (0)
No revisions yet.