Hi
This is very basic question for many of you people .
Actually take a sample snippet say sum of n natural numbers written using while & for .. i need to know the time took by the console application programs to execute ..
Stopclock class ?? if so n order to use it do i need to add reference some assembly or do i need to write USING ????
hOPE YOU GOT ME
My best Regards
Loading

Biswa Pujarini MohapatraPosted Jan 21, 2014, 3:43 AM
add using System.Diagnostics;
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
// write your code
stopWatch.Stop();
// Get the elapsed time as a TimeSpan value.
TimeSpan ts = stopWatch.Elapsed;
SUNIL GUTTAPosted Jan 21, 2014, 4:44 AM