System.InvalidOperationException in mscorlib.dll (PropertyValue.cs)
System.InvalidOperationException in mscorlib.dll (PropertyValue.cs)
Hello. Sorry for my english if it hurts your eyes.I am developping a photobooth based on DigicamControl software. However, I have trouble with the application."Exception of type 'System.InvalidOperationException' occured in mscorlib.dll but was not handled in user code.Collection was modified; enumeration opetation may not execute." This exception was randomly thrown : Sometimes when I start the application, sometimes when I take a photo...Problem seems to be in PropertyValue.cs in the foreach loop. Visual studio highlight (overline?) ' in 'public string Value { get { return _value; } set { //if (_value != value) //{ _value = value; if (ValueChanged != null && _notifyValuChange) { foreach (KeyValuePair<string, T> keyValuePair in _valuesDictionary) <== Here. { if (keyValuePair.Key == _value) { OnValueChanged(this, _value, keyValuePair.Value); } } } //} NotifyPropertyChanged("Value"); } }
-
- Posts: 867
- Joined: Tue Mar 26, 2013 9:52 pm
Can you check the code again
Can you check the code again i made some improvements.In mean time the code moved to https://github.com/dukus/digiCamControl
Error exit code 1 postbuild
Hello again. I have a new trouble with the new version of DigicamControl that I have'nt before.Postbuild command exit with code 1 : Do you know how to solve this...?
-
- Posts: 867
- Joined: Tue Mar 26, 2013 9:52 pm
Go to build and click on
Go to build and click on Clean up and Build All
It works well, thanks you !
It works well, thanks you !