题目内容

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?()

A. Implement the validation rules inside the Validating event handler of each TextBox control by throwing an exception when the value is invalid.
B. Implement the validation rules inside the TextChanged event handler of each TextBox control by throwing an exception when the value is invalid.
C. Implement the validation rules inside the setter of each property of the Customer class by throwing an exception when the value is invalid.
D. Add the following code segment to the InitializeComponent method of the Windows Form. this.errorProvider.DataSource = this.customerBindingSource;
E. Add the following code segment to the InitializeComponent method of the Windows Form. this.errorProvider.DataSource = this.customerBindingSource.DataSource; this.errorProvider.DataMember = this.customerBindingSource.DataMember

查看答案
更多问题

带状疱疹是由以下哪种病原体引起的()

A. 引起生殖器疱疹的病毒
B. 原虫
C. 细菌
D. 立克次体
E. 引起水痘的病毒

同一时刻拍摄相距3度的两颗小行星的照片,在曝光时间内它们相对于恒星有了移动,因此在底片上各自留有线状的痕迹。这两颗行星中哪一颗的位置比较接近地球和太阳?是痕迹较长的那颗还是痕迹较短的那颗?

火炬是什么信号?如何使用和保管?

报警装置最好采用变频的方法,使音调有上升和下降的变化。

A. 正确
B. 错误

答案查题题库