zoukankan      html  css  js  c++  java
  • c#遍历Dictionary使用KeyValuePair

    1.         Dictionary<stringstring> dic = new Dictionary<stringstring>();
    2.         dic.Add("台球网""www.52taiqiu.com");   
    3.         dic.Add("台球技巧""www.52taiqiu.com");   
    4.         dic.Add("台球视频""www.52taiqiu.com");   
    5.   
    6.         foreach (KeyValuePair<stringstring> item in dic)   
    7.         {   
    8.             Response.Write(string.Format("{0} : {1}<br/" + ">", item.Key, item.Value));   
    9.         }

      输出结果:
        台球网:www.52taiqiu.com
              台球技巧www.52taiqiu.com
              台球视频www.52taiqiu.com

  • 相关阅读:
    第11次作业
    第十次实验
    第九次作业
    第八次实验
    第七次作业
    第六次作业
    作业
    JAVA实验三
    JAVA实验二
    JAVA实验一
  • 原文地址:https://www.cnblogs.com/zhxhdean/p/2341435.html
Copyright © 2011-2022 走看看