I've tried to make a simple console application with timer tick event every second, but it's not working. Event doesn't trigger at all. Why is that?
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer();
timer1.Tick += Timer1_Tick;
timer1.Interval = 1000;
timer1.Start();
Console.ReadLine();
}
private static void Timer1_Tick(object sender, EventArgs e)
{
Console.WriteLine("test");
}
}
}