使用foreach修改字典会报错
private Dictionary<string, string> pools = new Dictionary<string, string>();
for (int i = 0; i < pools.Count; i++)
{
var item = pools.ElementAt(i);
//if(condiction)
//pools.Remove(item.Key);
}
使用foreach修改字典会报错
private Dictionary<string, string> pools = new Dictionary<string, string>();
for (int i = 0; i < pools.Count; i++)
{
var item = pools.ElementAt(i);
//if(condiction)
//pools.Remove(item.Key);
}
916
1677