辞書を反復処理するにはどうすればいいですか? 質問する

辞書を反復処理するにはどうすればいいですか? 質問する

C# で辞書を反復処理する方法をいくつか見てきました。標準的な方法はありますか?

ベストアンサー1

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

おすすめ記事