Topics: Issues / bugs, Questions
Sep 23, 2013 at 7:54 AM
In the commandexecute I send an message via the messagemediator form one viewmodel (vm A) to a other viewmodel (vm B). This viewmodel sends back an message when its operation is ready.

In "vm A" in the "OnMessage" method an value is changed in a observable collection. After this I get the following error:

"Exception has been thrown by the target of an invocation"
"Collection was modified; enumeration operation may not execute."

This exception occurs in
class: WeakAction
method: public bool Execute(TParameter parameter).
Line: this._action.DynamicInvoke(new object[] { base.Target, parameter });
Sep 23, 2013 at 5:56 PM
This means that some code is inside a foreach loop and then the items that are being enumerated are being changed. Can you provide a repro?