G
Guest
hi,
i am am fairly new to c# and trying to write a service to check some thing
periodically. i want to use a windows service. The onStart method is starting
a timer. The timer.elapsed event creates a new Handler, which is calling
another method. Is it possible to give this method an argument?
Code now:
timer.Elapsed += new ElapsedEventHandler(requestStat);
Code desired:
timer.Elapsed += new ElapsedEventHandler(requestStat(conn));
How can this be made??
i am am fairly new to c# and trying to write a service to check some thing
periodically. i want to use a windows service. The onStart method is starting
a timer. The timer.elapsed event creates a new Handler, which is calling
another method. Is it possible to give this method an argument?
Code now:
timer.Elapsed += new ElapsedEventHandler(requestStat);
Code desired:
timer.Elapsed += new ElapsedEventHandler(requestStat(conn));
How can this be made??