Which code segment should you add?

You create a console application that contains the following two arguments:

loginName as LoginName
givenName as UsersGivenName

You write the following code segment:

01: Dim userProf as New UserProfile.UserProfileServices()
02: userProf.CreateUserProfileByAccountName(loginName)
03: Dim firstName as UserProfile.PropertyData() = New UserProfile.PropertyData(0) {}
04: firstName(0) = New UserProfile.PropertyData()
05: firstName(0).Name = “FirstName”
06: firstName(0).Values = New UserProfile.ValueData(0) {}
07: firstName(0).Values(0) = New UserProfile.ValueData()
08: firstName(0).Values(0).Value = givenName

You need to create a profile and assign the user’s given name to the profile.

Which code segment should you add?

A. firstName(0).IsValueChanged = False
userProf.ModifyUserPropertyByAccountName(loginName, firstName) B. firstName(0).IsValueChanged = True
userProf.ModifyUserPropertyByAccountName(loginName, firstName) C. firstName(0).IsValueChanged = False
userProf.ModifyUserPropertyByAccountName(givenName, firstName) D. firstName(0).IsValueChanged = True
userProf.ModifyUserPropertyByAccountName(givenName, firstName)

You create a console application that contains the following two arguments:

loginName as LoginName
givenName as UsersGivenName

You write the following code segment:

01: Dim userProf as New UserProfile.UserProfileServices()
02: userProf.CreateUserProfileByAccountName(loginName)
03: Dim firstName as UserProfile.PropertyData() = New UserProfile.PropertyData(0) {}
04: firstName(0) = New UserProfile.PropertyData()
05: firstName(0).Name = “FirstName”
06: firstName(0).Values = New UserProfile.ValueData(0) {}
07: firstName(0).Values(0) = New UserProfile.ValueData()
08: firstName(0).Values(0).Value = givenName

You need to create a profile and assign the user’s given name to the profile.

Which code segment should you add?

A. firstName(0).IsValueChanged = False
userProf.ModifyUserPropertyByAccountName(loginName, firstName) B. firstName(0).IsValueChanged = True
userProf.ModifyUserPropertyByAccountName(loginName, firstName) C. firstName(0).IsValueChanged = False
userProf.ModifyUserPropertyByAccountName(givenName, firstName) D. firstName(0).IsValueChanged = True
userProf.ModifyUserPropertyByAccountName(givenName, firstName)

Answer: B



Leave a Reply 0

Your email address will not be published. Required fields are marked *