I want to do some changes here, I want to convert this application to winforms. And i want to store these output into a text file, How can I do it? please help
using System;
using System.Threading;
public static class Program
{
public static void Main()
{
// Create a Timer object that knows to call our TimerCallback
// method once every 2000 milliseconds.
Timer t = new Timer(TimerCallback, null, 0, 1000);
// Wait for the user to hit <Enter>
Console.ReadLine();
}
private static void TimerCallback(Object o)
{
// Display the date/time when this method got called.
Console.WriteLine(DateTime.Now);
// Force a garbage collection to occur for this demo.
GC.Collect();
}
}
Output of this application.
Source Stackoverflow