nerdexam
Microsoft

70-573 · Question #253

You create a class that inherits the SPPersistedObject class. The class has a field named Field1. You need to ensure that Field1 can be serialized and stored in the SharePoint configuration…

The correct answer is A. Add the default empty constructor. B. Mark Field1 with the [Persisted] attribute. MNEMONIC RULE: "[Persisted] + empty constructor" SPPersistedObject Class us/library/microsoft.sharepoint.administration.sppersistedobject.aspx The skinny on SPPersistedObject and the Hierarchical Object Store in SharePoint 2010 object-storein.aspx

Developing Business Logic

Question

You create a class that inherits the SPPersistedObject class. The class has a field named Field1. You need to ensure that Field1 can be serialized and stored in the SharePoint configuration database. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two)

Options

  • AAdd the default empty constructor.
  • BMark Field1 with the [Persisted] attribute.
  • CMark Field1 with the [Serializable] attribute.
  • DSet the value of the SPWeb.AllowUnsafeUpdate property.

How the community answered

(17 responses)
  • A
    71% (12)
  • C
    18% (3)
  • D
    12% (2)

Explanation

MNEMONIC RULE: "[Persisted] + empty constructor" SPPersistedObject Class us/library/microsoft.sharepoint.administration.sppersistedobject.aspx The skinny on SPPersistedObject and the Hierarchical Object Store in SharePoint 2010 object-storein.aspx

Topics

#SPPersistedObject#Persisted attribute#serialization#configuration database

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice