Which code element should you add at line 09?

You have a Microsoft .NET Framework console application that uses the SharePoint client object
model. The application contains the following code segment. (Line numbers are included for
reference only.) 01 ClientContext cCtx = new ClientContext(“http://intranet/hr”); 02 List
sharedDocList = cCtx.Web.Lists.GetByTitle(“Shared Documents”); 03 CamlQuery camlQuery =
new CamlQuery(); 04 camlQuery.ViewXml = 05 @”<View> 06 <Query> 07 <Where> 08 <Eq> 09
10 <Value Type=’Text’>Doc1.docx</Value> 11 </Eq> 12 </Where> 13 </Query> 14 </View>”; 15
ListItemCollection docLibItems = sharedDocList.GetItems(camlQuery); 16
cCtx.Load(sharedDocList); 17 cCtx.Load(docLibItems); 18 cCtx.ExecuteQuery(); You need to
ensure that the application queries Shared Documents for a document named Doc1.docx. Which
code element should you add at line 09?

You have a Microsoft .NET Framework console application that uses the SharePoint client object
model. The application contains the following code segment. (Line numbers are included for
reference only.) 01 ClientContext cCtx = new ClientContext(“http://intranet/hr”); 02 List
sharedDocList = cCtx.Web.Lists.GetByTitle(“Shared Documents”); 03 CamlQuery camlQuery =
new CamlQuery(); 04 camlQuery.ViewXml = 05 @”<View> 06 <Query> 07 <Where> 08 <Eq> 09
10 <Value Type=’Text’>Doc1.docx</Value> 11 </Eq> 12 </Where> 13 </Query> 14 </View>”; 15
ListItemCollection docLibItems = sharedDocList.GetItems(camlQuery); 16
cCtx.Load(sharedDocList); 17 cCtx.Load(docLibItems); 18 cCtx.ExecuteQuery(); You need to
ensure that the application queries Shared Documents for a document named Doc1.docx. Which
code element should you add at line 09?

A.
<FieldRef Name=’FileDirRef’/>

B.
<FieldRef Name=’FileLeafRef’/>

C.
<FieldRef Name=’FileRef’/>

D.
<FieldRef Name=’File_x0020_Type’/>



Leave a Reply 0

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