1.

Is There Any Sample C# Code For Simple Threading?

Answer»

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();
}
}

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();
}
}



Discussion

No Comment Found