我使用以下代码来创建和执行线程我需要停止它但不能看到线程.Sleep
任何想法我怎么能停止一段时间在那里执行?
var t = new Thread(() =>
{
try
{
//Line 1
Pause here
//Line 2
Pause here
//Line 3
}
catch (Exception ca)
{
MessageBox.Show(ca.Message);
}
});
t.SetApartmentState(ApartmentState.STA);
t.Start();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
250 次 |
| 最近记录: |