📄 creatthread.cs
字号:
//createthread.cs
using System;
using System.Threading;
class creatthread
{
//使用System.Threading命名空间中的public void委托Threadstart()
public void Method1()
{
Console.WriteLine("Method1 is the starting point of execution of the thread");
}
public static void Main()
{
creatthread newthread = new creatthread();
Thread Thread1 = new Thread(new ThreadStart(newthread.Method1));
Console.ReadLine();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -