InvalidOperationException: Collection was modified; enumeration operation may not execute. - C# 错误解析
InvalidOperationException: Collection was modified; enumeration operation may not execute. \u003cbr\u003e\u003cbr\u003e这个异常表示在枚举操作期间,集合被修改了。在使用 foreach 循环或者迭代器枚举集合时,如果在循环中修改了集合的元素,就会抛出这个异常。\u003cbr\u003e\u003cbr\u003e这个异常的中文解释是“无效操作异常:集合已被修改;无法执行枚举操作”。
原文地址: https://www.cveoy.top/t/topic/p2Xu 著作权归作者所有。请勿转载和采集!