关键利用KeyValuePair。

    定义一个Dictionary:

    Dictionary<int,Point> aggUpGroupPointDic = new Dictionary<int, Point>();

   遍历它:

   foreach (KeyValuePair<int,Point>keyValuePair  inaggDownGroupPointDic)

  {

     Console.WriteLine(“Point{0}’s position is ({1},{2})”,keyValuePair.Key,keyValuePair.Value.X,keyValuePair.Value.Y);

  }

posted on 2012-03-08 17:16  Bester  阅读(143)  评论(0编辑  收藏  举报