易丰科技

标题: 使用 KeyValuePair [打印本页]

作者: Calvin    时间: 2011-9-30 09:44
标题: 使用 KeyValuePair
  1. Dictionary<string, string> dictionary = new Dictionary<string, string>();

  2.             dictionary.Add("Name", "YiFeng");
  3.             dictionary.Add("Web", "http://www.yftek.com");
  4.             dictionary.Add("Tel", "123456789");

  5.             foreach (KeyValuePair<string, string> item in dictionary)
  6.             {
  7.                 System.Diagnostics.Debug.WriteLine(string.Format("{0} = {1}", item.Key, item.Value));
  8.             }  
复制代码






欢迎光临 易丰科技 (http://forum.yftek.com/) Powered by Discuz! X3