Is there any sample C# code for simple threading?

Some sample code follows: using System;

using System.Threading;

class ThreadTest

{

public void runme()

{

Console.WriteLine("Runme Called");

}

public static void Main(String[] args)

{

ThreadTest b = new ThreadTest();

Thread t = new Thread(new ThreadStart(b.runme));

t.Start();

}

}

Showing Answers 1 - 1 of 1 Answers

Ans:

using System;

using System.Threading;

class ThreadTest

{

public void runme()

{

Console.WriteLine("Runme Called");

}

public static void Main(String[] args)

{

ThreadTest b = new ThreadTest();

Thread t = new Thread(new ThreadStart(b.runme));

t.Start();

}

}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions