70-573 · Question #144
You create a console application to manage Personal Sites. The application contains the following code segment. (Line numbers are included for reference only.) 02 Dim profileManager As New…
The correct answer is C. Add the following line of code at line 05. MNEMONIC RULE: "Dispose" Disposing Objects
Question
You create a console application to manage Personal Sites. The application contains the following code segment. (Line numbers are included for reference only.) 02 Dim profileManager As New serProfileManager(ServerContext.GetContext(siteCollection)); 03 Dim profile As UserProfile = profileManager.GetUserProfile("domain\username"); 04 Dim personalSite As SPSite = profile.PersonalSite; 05 06 siteCollection.Dispose(); You deploy the application to a SharePoint site.After deploying the application, users report that the site loads slowly. You need to modify the application to prevent the site from loading slowly. What should you do?
Options
- ARemove line 06.
- BAdd the following line of code at line 05.
- CAdd the following line of code at line 05.
- DChange line 06 to the following code segment.
How the community answered
(52 responses)- A4% (2)
- B10% (5)
- C83% (43)
- D4% (2)
Explanation
MNEMONIC RULE: "Dispose" Disposing Objects
Topics
Community Discussion
No community discussion yet for this question.