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 Dim cCtx As ClientContext = New ClientContext(“http://contoso/sites/finance”)
02 Dim root As Web = cCtx.Site.RootWeb 03 cCtx.Load(root) 04 Dim webInfo As
WebCreationInformation = New WebCreationInformation 05 webInfo.Title = “site1” 06 webInfo.Url
= “site1” 07 webInfo.WebTemplate = “MPS#2” 08 root.Webs.Add(webInfo) 09 10 cCtx.Dispose
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 Dim cCtx As ClientContext = New ClientContext(“http://contoso/sites/finance”)
02 Dim root As Web = cCtx.Site.RootWeb 03 cCtx.Load(root) 04 Dim webInfo As
WebCreationInformation = New WebCreationInformation 05 webInfo.Title = “site1” 06 webInfo.Url
= “site1” 07 webInfo.WebTemplate = “MPS#2” 08 root.Webs.Add(webInfo) 09 10 cCtx.Dispose
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=’FileRef’/>

B.
<FieldRef Name=’FileLeafRef’/>

C.
<FieldRef Name=’FileDirRef’/>

D.
<FieldRef Name=’File_x0020_Type’/>



Leave a Reply 0

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