C# Return value from function invoked in thread
问题 I have a calculating thread function which invokes message function from other thread using Invoke and I want that calculating thread to get value(of valuetype, like integer) from that message function. How can I do this? The problem is that I still get old value of x variable after Invoke(...) and I expect value of 15 delegate void mes_del(object param); void MyThreadFunc() { ... int x = 5; object [] parms = new object []{x}; Invoke(new mes_del(MessageFunc), (object)parms); ... } void