答案 0 :(得分:0)
这是一个示例IF语句,您可以根据自己的需要进行定制。如果列B包含" x"它会查看您的网格并返回A列中的值。
static void Main(string[] args)
{
Thread[] thread = new Thread[101];
for (int i = 0; i < 101; i++)
{
thread[i] = new Thread(IntenseWork);
thread[i].Start();
}
Finish(thread);
}
private static void IntenseWork()
{
Thread.Sleep(5000);
}
private static void Finish(Thread[] threadArray)
{
foreach (Thread ta in threadArray)
{
ta.Join();
}
Console.WriteLine("Press Any Key to Continue...");
Console.ReadKey();
}