I have two comboboxes in a winform and they are both firing events when their SelectedValue is initially populated. This is fine, but I'd like to know if I can count on the order of the two event handlers being fired. I've found several resources explaining that you can't necessarily count on the order of event handlers that are both wired to the same event, but none so far that talk about different event handlers for different objects.
For example, consider the following code:
combobox1.SelectedIndexChanged += combobox1_selectedIndexChanged;
combobox2.SelectedIndexChanged += combobox2_selectedIndexChanged;
...
combobox1.SelectedValue = value1;
combobox2.SelectedValue = value2;
When the last two lines of the snippet above are run, can I be sure that combobox1_selectedIndexChanged
will always fire before combobox2_selectedIndexChanged
? So far that's always been the case when I've run it. I just wanted to know if that's guaranteed to be the case for this particular situation.