循环dictionary

来源:互联网 发布:淘宝海外叫什么 编辑:程序博客网 时间:2024/05/17 08:49
 
Dictionary<string, string> test = new Dictionary<string, string>();            test.Add("userName", "jiou");            test.Add("u2", "xx");            foreach (var dic in test)            {                Console.Write("key: {0}\nvalue: {1}\n", dic.Key, dic.Value);            }

原创粉丝点击