IT Certification,braindumps,original questions 70-573

IT Certification,braindumps,original questions 70-573

70-573 70-573 70-573 www.cert24.com

Exam: Number/Code : 70-573

Exam: TS: Office SharePoint Server, Application Development (available in 2010)

Version : Demo

QUESTION 1
You have a helper method named CreateSiteColumn that contains the following code segment.
private static void CreateSiteColumn(SPWeb web, string columnName)
{
}
You need to add a new site column of type Choice to a SharePoint site by using the helper method.
Which code segment should you include in the helper method?

A. SPField field = new SPFieldChoice(System.web.Lists[0].Fields, columnName);
B. web.Fields.Add(columnName, SPFieldType.Choice, true);
C. web.Lists[0].Fields.Add(columnName, SPFieldType.Choice, True);
D. web.Lists[0].Views[0].ViewFields.Add(columnName);

Answer: B

Explanation/Reference:
MNEMONIC RULE: “web.Fields.Add”
SPFieldCollection.Add Method (String, SPFieldType, Boolean)

http://msdn.microsoft.com/en-us/library/ms472869.aspx

70-573 70-573 70-573 www.cert24.com

QUESTION 2
You have a Web application that contains the following code segment.
private void CreatingSPSite()
{
SPSite siteCollection = null;
try
{
siteCollection = new SPSite(“http://contoso.com”);
}
finally
{
}
}
You need to prevent the code segment from causing a memory leak.
Which code segment should you add?

A. if (siteCollection != null)
{
siteCollection.Close();
}
B. if (siteCollection != null)
{
siteCollection.Dispose();
}
C. siteCollection = null;
D. siteCollection.WriteLocked = false;

Answer: B

Explanation/Reference:
MNEMONIC RULE: “Dispose of memory leak”
Difference between Close() and Dispose() Method

http://dotnetguts.blogspot.com/2007/06/difference-between-close-and-dispose.html

70-573 70-573 70-573 www.cert24.com

Comments are closed.