PrepAway - Latest Free Exam Questions & Answers

Which code segment should you include in the Web Part?

You have a document library named MyDocs. MyDocs has a column named Column1. Column1
is a required column. You discover that many documents are checked out because users fail to
enter a value for Column1. You need to create a Web Part to delete the documents. Which code
segment should you include in the Web Part?

PrepAway - Latest Free Exam Questions & Answers

A.
For Each file As SPCheckedOutFile In

CType(SPContext.Current.Web.Lists(“MyDocs”),SPDocumentLibrary).CheckedOutFiles
file.Delete Next

B.
For Each file As SPItem In SPContext.Current.Web.Lists(“MyDocs”).Items If
(file(“CheckOutStatus”) = “CheckOut”) Then file.Delete End If Next

C.
For Each file As SPListItem In
CType(SPContext.Current.Web.Lists(“MyDocs”),SPDocumentLibrary).Items If
(file(“CheckOutStatus”) = “CheckOut”) Then file.Delete End If Next

D.
For Each file As SPCheckedOutFile In
CType(SPContext.Current.Web.Lists(“MyDocs”),SPDocumentLibrary).CheckedOutFiles
file.TakeOverCheckOut Next


Leave a Reply