nerdexam
Microsoft

70-519 · Question #225

70-519 Question #225: Real Exam Question with Answer & Explanation

The correct answer is B. Apply the DebuggerDisplay attribute to the class.. See the full explanation below for the reasoning.

Question

An ASP.NET Web application contains a class named Money. The Money class has properties named Value and Currency. The Locals window of the Microsoft Visual Studio 2010 IDE currently displays the Value and Currency properties only when the Money object is expanded. You have the following requirements: - Display the Value and Currency property values in the Locals window. - Display the property values without requiring the developer to expand the Money object. You need to recommend an approach for modifying the Money class to meet the requirements. What should you do?

Options

  • AIn the Value and Currency property setters, call the Debug.WriteLine() method.
  • BApply the DebuggerDisplay attribute to the class.
  • CModify the class to inherit from the LocalVariableInfo class.
  • DIn the constructor, create a new instance of the LocalsItemDescription class for each of the

Community Discussion

No community discussion yet for this question.

Full 70-519 Practice