Asp.net中的错误 [英] Error In Asp.net
本文介绍了Asp.net中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
集合已修改;枚举操作可能无法执行.?
我该怎么解决?
Collection was modified; enumeration operation might not execute.?
how can i solved?
推荐答案
我做了 ^ ],其中很少,还有更多:
讨论1 [讨论2 [讨论3 [
I did this[^], got few of these and more:
Discussion 1[^]
Discussion 2[^]
Discussion 3[^]
Collection was modified; enumeration operation might not execute
当您尝试遍历任何集合并同时修改该集合时,可能会发生此错误.
因此,我的建议是将修改后的值存储到temp.集合,然后完成所有修改,然后将该集合分配给原始集合.
如果有帮助,请 投票 和 接受答案 .
Collection was modified; enumeration operation might not execute
This error probably occurs when you are trying to loop through any collection and at the same time you are modifying that collection.
So my advice would be to store modified value to temp. collection first and after accomplishing all the modification assign that collection to original collection.
Please vote and Accept Answer if it Helped.
这篇关于Asp.net中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文