Mar 6, 2007 #1 AgentM MIS Jun 6, 2001 387 US I have created a Dictionary Object using Dictionary<string,string> DictList = new Dictionary<string,string>(); The object is populated. How do I dynamically loop through it and read the keys and values ? Please let me know. Thank you.
I have created a Dictionary Object using Dictionary<string,string> DictList = new Dictionary<string,string>(); The object is populated. How do I dynamically loop through it and read the keys and values ? Please let me know. Thank you.
Mar 6, 2007 Thread starter #2 AgentM MIS Jun 6, 2001 387 US Got it. foreach (KeyValuePair<string, string> kvp in DictList) { Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value); } Thank you Upvote 0 Downvote
Got it. foreach (KeyValuePair<string, string> kvp in DictList) { Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value); } Thank you