且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在foreach循环中比较字典中的值

更新时间:2022-03-20 03:17:48

我假设从词典中取出字典名为ID就是你的



I have assumed that getting the dictionary out of the dictionary called ID is what you are after

foreach(KeyValuePair<string,>> pair in ID)
{
  Dictionary<string,int> inner = pair.Value;
  //You can now do what comparisons here you need to do on the dictionary.
}