本文介绍了线程在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只是寻找一些超简单。我需要生成一个方法开了一个新的线程。
- 在我没有怎么在意结束时或。
有人可以请帮助我?
感谢您
解决方案
线程的线程=新主题(()=> {
//线程code在这里
});
thread.Start();
Just looking for something ultra simple. I need to spawn a method off to a new thread.
- I don't care when or how it ends.
Can somebody please help me with this?
Thank you
解决方案
Thread thread=new Thread(() => {
// thread code here
});
thread.Start();
这篇关于线程在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!