nerdexam
Microsoft

70-516 · Question #92

70-516 Question #92: Real Exam Question with Answer & Explanation

The correct answer is D. Stopwatch sw = new Stopwatch();. See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4.0 to develop an application that connects to a local Microsoft SQL Server 2008 database. The application can access a high-resolution timer. You need to display the elapsed time, in sub-milliseconds (<1 millisecond), that a database query takes to execute. Which code segment should you use?

Options

  • Aint Start = Environment.TickCount;
  • BStopwatch sw = Stopwatch.StartNew();
  • CDateTime Start = DateTime.UtcNow;
  • DStopwatch sw = new Stopwatch();

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice