28 lines
517 B
C#
28 lines
517 B
C#
using System.Threading;
|
|
|
|
namespace CommonConsole
|
|
{
|
|
public class Program
|
|
{
|
|
private static Thread thread;
|
|
|
|
public static void Main()
|
|
{
|
|
thread = new Thread(new ParameterizedThreadStart(ThreadHandler));
|
|
thread.IsBackground = true;
|
|
thread.Start(thread);
|
|
|
|
while (thread.IsAlive)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
private static void ThreadHandler(object parameter)
|
|
{
|
|
Thread.Sleep(3000);
|
|
}
|
|
}
|
|
}
|
|
|