如何在另一个线程中使用参数调用函数? [英] How to call fuction with parameters in another thread?
本文介绍了如何在另一个线程中使用参数调用函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
线程t =新线程(新ThreadStart(SomeFunc));
t.Start();
无效SomeFunc(string param1,int param2)
{}
请帮助
Thread t = new Thread(new ThreadStart(SomeFunc));
t.Start();
Void SomeFunc(string param1, int param2)
{}
Please, help
推荐答案
看看以下内容:
http://www.albahari.com/threading/#_Creating_Starting [ http://www.tech-recipes.com/rx/1915/pass_variables_to_a_new_thread_in_c/ [ ^ ]
http://www.dotnetspider.com/resources/4698-Making-Parameterized-reads- C.aspx [ ^ ]
另请参阅: http://bytes.com/topic/c-sharp/answers/251966-calling-delegate-another-thread-compact-net [
Have a look at these:
http://www.albahari.com/threading/#_Creating_Starting[^]
http://www.tech-recipes.com/rx/1915/pass_variables_to_a_new_thread_in_c/[^]
http://www.dotnetspider.com/resources/4698-Making-Parameterized-reads-C.aspx[^]
Also look at: http://bytes.com/topic/c-sharp/answers/251966-calling-delegate-another-thread-compact-net[^]
这篇关于如何在另一个线程中使用参数调用函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文