I could use stopwatch to find execution time of a code
Example:
timer.Start();
for(int i=0; i<100; i++)
{
...
}
timer.Stop();
lTime.Text = timer.Elapsed.TotalMilliseconds.ToString();
But what if I call a function that use recursive?
timer.Start();
recur(a, b);
timer.Stop();
lTime.Text = timer.Elapsed.TotalMilliseconds.ToString();
Its show execution time 0.
Edit: This code running fine… I had one error in the recursive function…
The following works for me: