SharePoint interview questions [closed]

Let's have a list of some good interview questions for SharePoint developers. Please provide one question per entry, and if possible, the answers.

Also, please feel free to suggest corrections if the provided answers are wrong.

I will go first:

Q: How does SharePoint store pages?

A: How-to-locate-sharepoint-document-library-source-page-on-the-server?


Solution 1:

Q. When running with SPSecurity.RunWithElevatedPrivileges (web context) what credentials are being used?

A. The App Pool Identity for the web application running SharePoint.

Solution 2:

Q. When modifying a list item, what is the "main" difference between using SPListItem.Update() and SPListItem.SystemUpdate()?

A. Using SystemUpdate() will not create a new version and will also retain timestamps.

Solution 3:

Q: When should you dispose SPWeb and SPSite objects? And even more important, when not?

A: You should always dispose them if you created them yourself, but not otherwise. You should never dispose SPContext.Current.Web/Site and you should normally not dispose SPWeb if IsRootWeb is true. More tricky constructs are things along the line of SPList.ParentWeb.

Bonus Points if the candidate knows Roger Lambs Blog Post.