1Stopwatch sw; 2//start watch 3sw = Stopwatch.StartNew(); 4 5//do something here 6//... 7 8//check the elapsed 9Console.WriteLine("{0}: Safe2DimArrayAccess", sw.Elapsed);