[Mono-list] Timer, possible bug?

2004-05-21 Thread Julio Jiménez
why this little program never stop when timer is running?
using System;
using System.Timers;
public class Timer1
{
   public static void Main()
   {
   System.Timers.Timer aTimer = new System.Timers.Timer();
   aTimer.Elapsed+=new ElapsedEventHandler(OnTimedEvent);
   // Set the Interval to 1 seconds.
   aTimer.Interval=1000;
   //aTimer.AutoReset = false;
   //aTimer.Enabled=true;
   aTimer.Start ();
   Console.WriteLine(Testing Timer, interval = 1 second. Press
\'q\' to quit the sample.);
   while(System.Console.Read()!='q');
   }
   // Specify what you want to happen when the Elapsed event is raised.
   private static void OnTimedEvent(object source, ElapsedEventArgs e)
   {
   Console.WriteLine(Hello World!);
   }
}
I think System.Console.Read() never ends
regards
Julio Jiménez

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Timer, possible bug?

2004-05-21 Thread Miguel de Icaza
Hola Julio,

 why this little program never stop when timer is running?

Please file this as a bug report;  Developers do not necessarily check
the list, you should have ton bugzilla:

http://www.go-mono.com/bugs.html

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list