Why use BeginInvoke here?
问题 I am looking into someone else's code and do not have much experience with anything to do with multi-threading. I came across this line of code: BeginInvoke((MethodInvoker)delegate() { btnCalibrate.PerformClick(); }); I was wondering why do this when just this would have worked: btnCalibrate.PerformClick(); Thanks for your answers. 回答1: Because if this code ran in a different thread from the one that created the button in the GUI, an exception would be thrown. Background threads cannot