网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

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

A. 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.


参考答案

更多 “ 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? ()A. 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. ” 相关考题
考题 You’ll be punished by law if you ________ your child. (A) use(B) abuse(C) used(D) abused

考题 Tom: You are playing guitar well. Can you read music? Charles: No, I don't. I just listen to songs on the radio and then play them until they sound right. Tom: ______ Charles: No, really.A.You're lyingB.You're cheatingC.You are boastingD.You're kidding

考题 DataSet中与数据库表对应的对象是DataTable.() 此题为判断题(对,错)。

考题 You’re going to have a quiz ( )by another two in the ( )month. A. followed,followedB. followed,followingC. following,followedD. following,following

考题 Does modern logistics mean transportation and delivery?()Modern logistics is more about effective and efficient flow of materials and information.A、 Yes, you’re rightB、 No, it’s not the whole storyC、 No, you' re wrong

考题 You’re such a hardworking student, you()the praise. A、reserveB、deserveC、conserveD、preserve

考题 – David, you've been losing your temper over nothing lately.– ( ).A. I haven’t been getting much sleep eitherB. You’d better not push yourself too hard, or you’ll get sickC. I’m sorry. I shouldn’t have blown up like thatD. You’d better do exercises regularly

考题 You've misspelled this word again.You'd better look it up () 此题为判断题(对,错)。

考题 Me,you是两个初始集合,则下列关于派生集合定义方式正确的是A.link/me,you/:a;B.link(me,you):a;C.link/me you/a;D.link(me,you)/a;

考题 你最好控制一下上网聊天的时间。(汉译英)A.You'd better set a limit for your online chat time.B.You'd better set a limit on your online chat time.C.You'd better set a limit on your online chatting time.D.You'd better set a limit for your online chatting time.