小编典典

我已经看到了几种在 C# 中迭代​​字典的不同方法。有标准方法吗?

javascript

我已经看到了几种在 C# 中迭代​​字典的不同方法。有标准方法吗?


阅读 261

收藏
2022-01-24

共1个答案

小编典典

foreach(KeyValuePair<string, string> entry in myDictionary)
{
    // do something with entry.Value or entry.Key
}
2022-01-24