Se for uma aplicação do tipo console, veja este código para trabalhar com thread:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace ConsoleApplication1
{
class Program
{
static void MeuMetodo()
{
for (int i = 0; i < 10; i++)
{
Console.WriteLine("Meu método " + i);
}
}
static void Main()
{
while (true)
{
Console.WriteLine("\nMain");
Console.WriteLine(DateTime.Now);
Thread thread = new Thread(new ThreadStart(MeuMetodo));
thread.Start();
System.Threading.Thread.Sleep(1000);
}
}
}
}
Vitor Mendes | Seu feedback é muito importante para todos!
Visite o meu site: http://www.vitormendes.com.br/