问题
I have noticed that if I change a visible property of a control, such as label1.Text, from another thread that did not create the control, Visual Studio will throw an invalid cross-thread operation exception. But if I change a non-visible property of the control, say label1.Name, then no exception is thrown. Why is that?
来源:https://stackoverflow.com/questions/65839267/why-cross-thread-exception-only-thrown-when-you-change-visible-properties-of-a-c