Howdy, Stranger!

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

Categories

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

Jeson84Jeson84 USAPosts: 90Member

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?

Tagged:

Comments

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