Answers for "enumerate dictionary c#"

C#
0

enumerate dictionary c#

foreach(KeyValuePair<int, string> kvp in dictionary)
{
   Console.WriteLine("Key : " + kvp.Key.ToString() + ", Value : " + kvp.Value);
}
Posted by: Guest on December-20-2021
0

enumerate dictionary c#

Dictionary<int, string> dict = new Dictionary<int, string>();
foreach (KeyValuePair<int, string> kvp in dict)
{
  int key = kvp.Key;
  string value = kvp.Value;
}
Posted by: Guest on December-20-2021

C# Answers by Framework

Browse Popular Code Answers by Language