Implement IDisposable In TimeTracker Class

Mar 26, 2009 at 4:30 PM
You can implement the IDisposable interface in the TimeTracker Class then you can use the tracker like this

using (TimeTracker tempTracker = new TimeTracker())
    //Code To Measure Its Performance

At the end the elapsed time can be recorded in the dispose method.
Mar 26, 2009 at 4:47 PM
Thank you for your suggestion. I will look into this.
Mar 26, 2009 at 6:44 PM
Implemented your suggestion in the source as an optional use. I like the out-of-scope catching ability for more then one exit paths.
Thank you.