题目内容

You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.) 01 DataTable dt = new DataTable(“Products”); 02 dt.Columns.Add(new DataColumn(“Price”, typeof(decimal))); 03 dt.Columns.Add(new DataColumn(“Quantity”, typeof(Int32))); 04 DataColumn dc = new DataColumn(“Total”, typeof(decimal)); 05 dt.Columns.Add(dc); You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()

Add the following code segment after line 05. dc.ExtendedProperties["Total"] = "Price * Quantity”;
B. Add the following code segment after line 05. dc.Expression = “Prince * Quantity”;
C. Write an event handler for the DataTable's TableNewRow event that updates the row's Total.
D. Write an event handler for the DataTable's ColumnChanged event that updates the row's Total.

查看答案
更多问题

循环烷烃换热器高温侧投用后低温侧需投用。

A. 正确
B. 错误

礼仪是指人们在()交往中逐渐形成并共同遵守的规范与准则。

A. 家庭
B. 学习
C. 社会
D. 单位

在战略管理过程中,只要制定了科学的发展战略,就可以自然而然地实施。

A. 正确
B. 错误

油压装置压油槽里气体容积与油的容积的比为3:1。

A. 正确
B. 错误

答案查题题库