My application throw the exception occasionally:
Exception type: InvalidOperationException Exception message: Collection was modified; enumeration
Actually InvalidOperationException Exception message: Collection was modified; enumeration operation may not execute means:
We are changing the elements in the collection while looping over it with foreach.
I think this should solve your problem.
foreach (var func in list.ToList())
{
//Do your stuff
}