You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
668 B
C#

/*
* C# Program to Create a Simple Thread
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
class program
{
public void WorkThreadFunction()
{
for (int i = 0; i < 5; i++)
{
Console.WriteLine("Simple Thread");
}
}
}
class threprog
{
public static void Main()
{
program pg = new program();
Thread thread = new Thread(new ThreadStart(pg.WorkThreadFunction));
thread.Start();
Console.Read();
}
}
/*
Simple Thread
Simple Thread
Simple Thread
Simple Thread
Simple Thread