for循环 Dictionary

Posted x_蜡笔小新

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了for循环 Dictionary相关的知识,希望对你有一定的参考价值。

Dictionary<string, string> dic = new Dictionary<string, string>();
            dic.Add("1", "1");

            for (int index = 0; index < dic.Count; index++)
            {
                var item = dic.ElementAt(index);
                var itemKey = item.Key;
                var itemValue = item.Value;
            }

  

以上是关于for循环 Dictionary的主要内容,如果未能解决你的问题,请参考以下文章