nerdexam
Microsoft

70-573 · Question #196

You have a custom user profile property named MyProperty. You need to create a Web Part that displays the value of MyProperty for the current user. Which code segment should you use?

The correct answer is C. Dim profileManager As New UserProfileManager(SPServiceContext.Current). See the full explanation below for the reasoning.

Question

You have a custom user profile property named MyProperty. You need to create a Web Part that displays the value of MyProperty for the current user. Which code segment should you use?

Options

  • ADim profile As String =
  • BDim profile As String = SPContext.Current.Web.Users("MyProperty").
  • CDim profileManager As New UserProfileManager(SPServiceContext.Current)
  • DDim profileManager As New UserProfileManager(SPServiceContext.Current)

How the community answered

(18 responses)
  • B
    11% (2)
  • C
    83% (15)
  • D
    6% (1)

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice