ConcurrentDictionaryからIEnumeratorタイプを取得しました。私は次の方法を使用してそれを反復しようとしています
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,string>>
Ien = Concur_Dictionary.GetEnumerator();
foreach (KeyValuePair<string, string> pair in Ien) -->Error here
{
}
次のエラーが発生します
Error 4 foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,string>>' because 'System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,string>>' does not contain a public definition for 'GetEnumerator'
このIEnumeratorを反復処理する方法に関する提案はありますか?