C# Threading - How to start and stop a thread

前端 未结 3 1431
囚心锁ツ
囚心锁ツ 2020-12-13 19:38

Can anyone give me a headstart on the topic of threading? I think I know how to do a few things but I need to know how to do the following:

Setup a main thread that

3条回答
  •  春和景丽
    2020-12-13 20:23

    Thread th = new Thread(function1);
    th.Start();
    th.Abort();
    
    void function1(){
    //code here
    }
    

提交回复
热议问题