user8961
2
Q:

c# stopwatch

private void timer1_Tick(object sender, EventArgs e)
{
    TimeSpan duration = DateTime.Now - _start;
    label3.Text = duration.ToString(<some format string>);
}
2

  var timer = new Stopwatch();

  timer.Start();
  // do stuff
  timer.Stop();
}
1

New to Communities?

Join the community