I am using a background worker for some reason I am getting an error that saids collection modified error, enumeration may not be executed, I am basically launching the Listview thats on a form, to always give me import status on data on a list view, I am able to close and open the list view at any given time.
Can someone point me how to get pass this error when I am trying to launch the form to look the update of the list view.
public void LoadList(List<ImportLog> ImportList)
{
if (ImportList != null){
// save the ImportStatusList for later
this.ImportStatusList = ImportList;
foreach (ImportLog Status in this.ImportStatusList)//Error occurs
{AddStatus(Status);}
}
else
{
MessageBox.Show("Message Viewer is Empty"
);
Visible = false;

VulpesRank #55 · 29.2K reputationPosted Mar 25, 2012, 6:00 AM EDT
Sorry, I'm no help on SSIS but there are other folks here who might be. I'd ask the question on a new thread.
Suthish NairRank #92 · 22.8K reputationPosted Mar 23, 2012, 7:03 AM EDT
David SmithRank #999 · 2K reputationPosted Mar 23, 2012, 8:58 AM EDT
Collection was modified; enumeration operation may not execute
David SmithRank #999 · 2K reputationPosted Mar 23, 2012, 9:03 AM EDT
when I get the collection is being modified, enumeration may not execute.
VulpesRank #55 · 29.2K reputationPosted Mar 24, 2012, 12:31 PM EDT
David SmithRank #999 · 2K reputationPosted Mar 24, 2012, 10:02 PM EDT