Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


What is the standard and most effective way to iterate over a Dictionary in C#?

Jeson84Jeson84 USAMember Posts: 90

I searched for a reference online and found few ways to iterate over a Dictionary in C#. What is the standard way to do this?



  • DavidMDavidM USAMember Posts: 342
    foreach(KeyValuePair<string, string> entry in YourDictionaryName)
        // Manipulate entry.Value or entry.Key as you wish
Sign In or Register to comment.