Calculate the execution time of a method C# 03-06-2016 18:41:27 C# / C# BASICS 0 Bookmark(s) 331 View(s) var startTime = System.Diagnostics.Stopwatch.StartNew(); //Code to execute watch.Stop(); var timeTaken= startTime .ElapsedMilliseconds;