URGENT - Need help with timer event handler

This is urgent, hence the 500 pts.

I've created a subclass of the Timer class.  My main program creates an ArrayList of this new Timer class, clsTimer.  I would like to be able to hook up a new Tick event handler for each timer as I see fit.  For instance, in the main form, I have written a routine called LoadData() that I would like to use as the Tick event of the first clsTimer instance.  The next instance of clsTimer can hook to a totally different routine.  I've done the following:

// clsTimer
using System;
using System.Windows.Forms;

namespace Inhallation
      /// <summary>
      /// Summary description for clstimer.
      /// </summary>
      public class clsTimer : System.Windows.Forms.Timer

            public int TimerNum;
            public string TimerName;
            public Timer objTimer;
            //public int Interval;
            public bool StartTimer;

            public clsTimer(string timername, int interval, bool starttimer)
                  // TODO: Add constructor logic here
                  this.TimerName  = timername;
                  //this.Interval = interval;
                  objTimer.Interval = interval;

                  if (this.StartTimer)

            public clsTimer(bool starttimer)
                  if (starttimer)


From my main form, I do this:

private void Start_Environmental_Monitoring(string name, int interval)
                  // Initializes equipment and starts the 2701

                  // For test purposes, use the Test_2701
                  // Load test data

                  object sender = null;
                  System.EventArgs e = null;

                  this.arTimers.Add( new clsTimer(name,interval*60000,false) );
                  ((clsTimer) arTimers[0]).Tick += new System.EventHandler(this.LoadTestData());
                  ((clsTimer) arTimers[0]).Start();

When I build the project, it points to the line, ((clsTimer) arTimers[0]).Tick += new System.EventHandler(this.LoadTestData()); , and says "Method name expected".
Am I just setting this up wrong?  Let me know if you need more information.  Thank you.

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Expert1701Connect With a Mentor Commented:
Remove the brackets, and it should work:

  ((clsTimer) arTimers[0]).Tick += new System.EventHandler(this.LoadTestData);
jvalescuAuthor Commented:
Thank you.  It would have taken me another 8 hours to figure that out!
You're welcome!
All Courses

From novice to tech pro — start learning today.