gpt4 book ai didi

c# - C# 中的线程

转载 作者:太空宇宙 更新时间:2023-11-03 17:10:49 24 4
gpt4 key购买 nike

只是在寻找超简单的东西。我需要为新线程生成一个方法。

  1. 我不在乎它何时或如何结束。

有人可以帮我解决这个问题吗?

谢谢

最佳答案

对于在 winforms 中启动一个新线程,ThreadPool 是最简单的:

ThreadPool.QueueUserWorkItem(state => 
{
// put whatever should be done here
});

关于c# - C# 中的线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3003676/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com