0

In a console app I want to output at the end this:

 Console.WriteLine("Finished Analyze with duration: " + watch.Elapsed);

Are there any side effects in using the Stopwatch class, when the assembly is build in the release mode?

Or is Stopwatch really only for debugging purposes?

user2864740
  • 60,010
  • 15
  • 145
  • 220
Pascal
  • 12,265
  • 25
  • 103
  • 195
  • No, [`Stopwatch`](http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch(v=vs.110).aspx) is not meant to be used only for debugging. Use it for whatever you want. – Tim Schmelter Aug 13 '14 at 09:48
  • 2
    Or in the affirmative: *Yes*, Stopwatch can be used in Release builds. – user2864740 Aug 13 '14 at 09:48

0 Answers0