using System;
using System.Threading;
class Program
{
static void Main()
{
ThreadStart ts = new ThreadStart(Test.DemoMethod);
Thread t = new Thread(ts);
t.Start();
}
}
class Test
{
public static void DemoMethod()
{
for (int i = 1; i <= 10; i++)
{
Console.WriteLine(i);
}
}
}
using System.Threading;
class Program
{
static void Main()
{
ThreadStart ts = new ThreadStart(Test.DemoMethod);
Thread t = new Thread(ts);
t.Start();
}
}
class Test
{
public static void DemoMethod()
{
for (int i = 1; i <= 10; i++)
{
Console.WriteLine(i);
}
}
}
No comments:
Post a Comment