static void Main(string[] args)
{
Console.WriteLine("Main Thread Start");
Thread T1 = new Thread(ThreadOneMethod);
T1.Start();
T1.Join();
Thread T2 = new Thread(ThreadTwoMethod);
T2.Start();
T2.Join();
Console.WriteLine("Thread Two Ends");
Console.WriteLine("Thread One Ends");
Console.WriteLine("Main Thread Ends");
}
public static void ThreadOneMethod()
{
Console.WriteLine("Thread One Starts");
}
public static void ThreadTwoMethod()
{
Console.WriteLine("Thread Two Starts");
}
public static void ThreadThreeMethod()
{
Console.WriteLine("Thread Three Starts");
}
static void Main(string[] args)
{
Console.WriteLine("Main Thread Start");
Thread T1 = new Thread(ThreadOneMethod);
T1.Start();
T1.Join();
Thread T2 = new Thread(ThreadTwoMethod);
T2.Start();
T2.Join();
Console.WriteLine("Thread Two Ends");
Console.WriteLine("Thread One Ends");
Console.WriteLine("Main Thread Ends");
}
public static void ThreadOneMethod()
{
Console.WriteLine("Thread One Starts");
}
public static void ThreadTwoMethod()
{
Console.WriteLine("Thread Two Starts");
}
public static void ThreadThreeMethod()
{
Console.WriteLine("Thread Three Starts");
}