?????????????????????ù????????????÷?????ò??????????????й???????????????????в??????????????~~
????1???????????????????????????????п?????????????????????????????????????????????????????????Э??????????????????????????Э?????????????????е?????????????ò????????????????????л??и???????????
????2????????????
??????1????????????÷?????Thread oGetArgThread = new Thread(new ThreadStart(() =>{});?????÷?????????????ù???????????ThreadStart???????С???ThreadStart???????????
????public delegate void ThreadStart();
?????????????в???????з????????С???????????????£?
static void Main(string[] args)
{
Thread oGetArgThread = new Thread(new ThreadStart(Test));
oGetArgThread.IsBackground = true;
oGetArgThread.Start();
for (var i = 0; i < 1000000; i++)
{
Console.WriteLine("????????" + i);
//Thread.Sleep(100);
}
}
private static void Test()
{
for (var i = 0; i < 1000000; i++)
{
Console.WriteLine("?????????" + i);
//Thread.Sleep(100);
}
}
?????????????в?????з????????????????С?????????????巽??д????????????
static void Main(string[] args)
{
Thread oGetArgThread = new Thread(new System.Threading.ThreadStart(() =>
{
for (var i = 0; i < 1000000; i++)
{
Console.WriteLine("?????????" + i);
//Thread.Sleep(100);
}
}));
oGetArgThread.IsBackground = true;
oGetArgThread.Start();
}
?????????????????????????????????£?
????c#???????
???????????????????????????????????????????С?
??????????????????????????????????????е?????в????????з??????????в??????з??????????????????????????new Thread()?????????????
????public Thread(ParameterizedThreadStart start);
????public Thread(ThreadStart start);
????public Thread(ParameterizedThreadStart start?? int maxStackSize);
????public Thread(ThreadStart start?? int maxStackSize);