这个例外是什么意思 [英] What does this exception means
本文介绍了这个例外是什么意思的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
任何人都可以告诉我这个例外是什么意思
集合被修改;枚举操作可能无法执行。
谢谢
hi all
Can any one please tell me what does this exception means
"Collection was modified; enumeration operation may not execute."
Thanks
推荐答案
为什么这么懒?我在 Google [ ^ ]和我发现大约1,160,000个结果(0.20秒)。
添加定义[/编辑]
当您在通用列表或集合上执行foreach循环时,会出现此错误,并且循环内部有一行代码正在尝试修改列表的内容。
- Amit
Why being so lazy? I searched with your subject in Google[^] and I found About 1,160,000 results (0.20 seconds).
Added definition[/Edit]
This error occurs when you are performing a foreach loop over a generic list or a collection and there is a line of code inside the loop that is trying to modify the contents of the list.
--Amit
问题尚未完成..
我认为您正在尝试通过迭代语句循环/迭代相同的集合来更改集合中的值...
Question is not complete ..
I think you are trying to change the values in the collection while looping/iterating the same collection by iterating statements...
http://forums.asp.net/t/1147145.aspx [ ^ ]
这篇关于这个例外是什么意思的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文