Answers for "csharp dictinoary for loop values"

C#
16

iterate through dictionary c#

foreach(var item in myDictionary)
{
  foo(item.Key);
  bar(item.Value);
}
Posted by: Guest on December-19-2019
1

c# iterate over a dictionary

foreach(KeyValuePair<string, string> entry in myDictionary)
{
    // do something with entry.Value or entry.Key
}
Posted by: Guest on December-08-2020

C# Answers by Framework

Browse Popular Code Answers by Language