You plan to use a console application that accepts the login name as an argument and returns the first name of the user.
You write the code segment for the console application:
01: Dim profileServices as New UserProfile = ProfileServices() profileServices.UseDefaultCredentials = True
02: Dim userProps as UserProfile.PropertyInfo() =
profileServices.GetUserProfileSingle()
03: …
04: For Each currentProp as Object in userProps
05: If Direct Cast(currentProp, UserProfile.PropertyData).Name = “FirstName” Then
06: Console.WriteLine(Direct Cast(currentProp,
UserProfile.ProperData).Values(0).Value)
07: End If
08: Next
You need to pre-fill the userProps variable in line 4 to ensure the first name is returned.
Which method should you use at line 3?
A.
GetPropertyChoices
B.
GetUserProfile.Index
C.
GetUserProfileByName
D.
GetUserProfileSchema