Learn 2 CSharp 1using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace learn2CSharp1
{
class Program
{
static void Main(string[] args)
{
for (int i = 0; ; i++)
{
if (Console.KeyAvailable && keyPressHandler(Console.ReadKey(true))) break;
Console.Write(i + " ");
Thread.Sleep(250);
}
}
protected static Boolean keyPressHandler(ConsoleKeyInfo input)
{
if (input.Key == ConsoleKey.Escape) return true;
return false;
}
}
}
(comments (0) | permalink) |

- a little order in the chaos where the mind dwells


