I want to record the amount of time it takes to execute my custom method, but I have never worked with the timer class or methods before, I know I'm doing something wrong, .
Here's what I have.
System.Timers.Timer Time;
int Mili = 0 ;
data = Generate();
Time.Enabled = true;
BSort= BubbleSort(data);
Time.Enabled = false;
A timer is for a periodic event. You should look at the
Stopwatch
class.