Collection was modified; enumeration operation may not execute
当用foreach遍历ObservableCollection,如果使用Add或Remove操作,会出现以下错误:
Collection was modified; enumeration operation may not execute
解决办法是改为使用for循环。
当用foreach遍历ObservableCollection,如果使用Add或Remove操作,会出现以下错误:
Collection was modified; enumeration operation may not execute
解决办法是改为使用for循环。