nerdexam
Microsoft

70-516 · Question #217

You need to ensure that an exception is thrown when color names are set to less than two characters. What should you do?

The correct answer is A. Add the following method to the Color partial class in Model\Color.cs. See the full explanation below for the reasoning.

Question

You need to ensure that an exception is thrown when color names are set to less than two characters. What should you do?

Options

  • AAdd the following method to the Color partial class in Model\Color.cs:
  • BAdd the following code segment to the ContosoEntities partial class in Model\ContosoEntities.cs:
  • CAdd the following attribute to the Name property of the Color class in the entity designer file:
  • DAdd the following method to the Color partial class in Model\Color.cs:

How the community answered

(56 responses)
  • A
    84% (47)
  • B
    9% (5)
  • C
    5% (3)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice