Since the book was first published, Microsoft has created a Stopwatch class that serves the same purpose as the Timing class discussed in Chapter 1. The following code demonstrates how to use the Stopwatch class to perform timing tests on code. For more information on the Stopwatch class, go to: http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx using System; using System.Collections; using System.Linq; using System.Text; using System.Diagnostics; namespace chapter1 { class chapter1 { static void Main(string[] args) { int[] nums = new int[100000]; BuildArray(nums); Stopwatch sw = new Stopwatch(); sw.Start(); DisplayNums(nums); sw.Stop(); Console.WriteLine(); Console.WriteLine("Time: " + sw.Elapsed.ToString()); Console.ReadKey(); } static void BuildArray(int[] arr) { for (int i = 0; i < 100000; i++) arr[i] = i; } static void DisplayNums(int[] arr) { for (int i = 0; i < 100000; i++) Console.Write(arr[i] + " "); } } }