Which code segment should you add at line 03?

You have a list named Projects that contains a column named ClassificationMetadata. You need
to create a Web Part that updates the ClassificationMetadata value to NA for each item in the
Projects list. You write the following code segment. (Line numbers are included for reference
only.) 01 foreach (SPListItem currentItem in SPContext.Current.Web.Lists[“Projects”]. Items) 02 {
03 04 } Which code segment should you add at line 03?

You have a list named Projects that contains a column named ClassificationMetadata. You need
to create a Web Part that updates the ClassificationMetadata value to NA for each item in the
Projects list. You write the following code segment. (Line numbers are included for reference
only.) 01 foreach (SPListItem currentItem in SPContext.Current.Web.Lists[“Projects”]. Items) 02 {
03 04 } Which code segment should you add at line 03?

A.
currentItem[“ClassificationMetadata”] = “NA”;

B.
currentItem.Fields[“ClassificationMetadata”].DefaultFormula = “NA”;

C.
currentItem.Fields[“ClassificationMetadata”].DefaultValue = “NA”;

D.
currentItem[“Value”] = “ClassificationMetadata/NA”;



Leave a Reply 0

Your email address will not be published. Required fields are marked *