???????.NET???????к???
???????????? ???????[ 2012/11/14 11:09:18 ] ????????
??????????????????????????DebugLZQ??д???LINQ???Demo?????????????????????????????????????????????£????????????????????????????????LZ??????????????????????ü???????????????????ú????????????????????ú????
????1????????????κ???
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace ?????
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("???????");
Thread t = new Thread(new ThreadStart(ShowTime));//???ThreadStart??е???????
t.Start();//????????????????Main???
Console.WriteLine("???????????");
//while (t.IsAlive == true) ;
Thread.Sleep(1000);
t.Abort();
t.Join();//????Main???????t???
Console.WriteLine("--------------");
Console.ReadKey();
}
static void ShowTime()
{
while (true)
{
Console.WriteLine(DateTime.Now.ToString());
}
}
}
}
???????ThreadStart??е???????£?
????????????????????????????????void?????????
????2????????????κ??????????????
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace ?????2_??????
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Main?????");
Thread t = new Thread(new ParameterizedThreadStart(DoSomething));//???ParameterizedThreadStart??е???????
t.Start(new string[]{"Hello"??"World"});
Console.WriteLine("Main?????????");
Thread.Sleep(1000);
t.Abort();
t.Join();//????Main???????t???
Console.ReadKey();
}
static void DoSomething(object s)
{
string[] strs = s as string[];
while (true)
{
Console.WriteLine("{0}--{1}"??strs[0]??strs[1]);
}
}
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11