Dictionary<intint> dict = new Dictionary<intint>();
            dict.Add(
2001);
            dict.Add(
1002);
            dict.Add(
503);
            dict.Add(
204);
            
foreach( KeyValuePair<int,int> entry in dict)
            {
                Console.WriteLine(
                    
string.Format("key:{0}\nvalues:{1}\n",
                                  entry.Key,
                                  entry.Value
                                 )
                );
            }
示例一出....就全明白了....net 中Dictionary的遍历

相关文章:

  • 2021-07-21
  • 2021-09-13
  • 2022-12-23
  • 2021-07-29
  • 2022-03-05
  • 2021-07-28
猜你喜欢
  • 2022-02-09
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案