Hi,
        I am trying to run the code below, but it doesn't seem to work.  It
should send output to the console after 3 seconds, but It doesn't seem
to trigger off my event.  Is there something wrong with my code, or is
it a problem with System.Timers?

I am using Mono 1.0.1

Here is the code:

using System;
using System.Timers;

public class MyTime 
{
        public static void Main (string [] args)
        {
                Timer myTimer = new Timer (3000);
                myTimer.Elapsed += new ElapsedEventHandler (MyTimeEvent);

                while (Console.Read () != 'q');
        }
        
        private static void MyTimeEvent (object o, ElapsedEventArgs args)
        {
                Console.WriteLine ("Hello");
        }
}

Thanks 
Jamil

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

Reply via email to