nerdexam
Microsoft

70-511 · Question #1

You use Microsoft .NET Framework 4 to create a Windows Forms application. You add a new class named Customer to the application. You select the Customer class to create a new object data source. You…

The correct answer is C. Implement the validation rules inside the setter of each property of the Customer class by D. Add the following code segment to the InitializeComponent method of the Windows Form. See the full explanation below for the reasoning.

Question

You use Microsoft .NET Framework 4 to create a Windows Forms application. You add a new class named Customer to the application. You select the Customer class to create a new object data source. You add the following components to a Windows Form:

  • A BindingSource component named customerBindingSource that is data-

bound to the Customer object data source.

  • A set of TextBox controls to display and edit the Customer object

properties. Each TextBox control is data-bound to a property of the customerBindingSource component.

  • An ErrorProvider component named errorProvider that validates the

input values for each TextBox control. You need to ensure that the input data for each TextBox control is automatically validated by using the ErrorProvider component. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Options

  • AImplement the validation rules inside the Validating event handler of each TextBox control by
  • BImplement the validation rules inside the TextChanged event handler of each TextBox control
  • CImplement the validation rules inside the setter of each property of the Customer class by
  • DAdd the following code segment to the InitializeComponent method of the Windows Form.
  • EAdd the following code segment to the InitializeComponent method of the Windows Form.

How the community answered

(41 responses)
  • A
    12% (5)
  • B
    7% (3)
  • C
    78% (32)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 70-511 Practice