Check our online training feedbacks Here

14 February 2011

Get the execution time for .net code


using System;
using System.Diagnostics;
using System.Threading;
class ClsCalculateExectionTime
{
    public static void Main(string[] StrPriArgs)
    {
        Stopwatch ObjPriWatch= new Stopwatch();
        ObjPriWatch.Start();
       
       // Your Custom Code Start
      // Your Custom Code End
ObjPriWatch.Stop(); TimeSpan ObjPriSpan= ObjPriWatch.Elapsed;
    }
}


No comments :

Post a Comment

Your comments, Feedbacks and Suggestions are very much valuable to me :)