Which code segment should you add at line 05?

You need to programmatically add a user named User1 to a group named Group1. You write the
following code segment. (Line numbers are included for reference only.) 01 Dim login As String =
“User1” 02 Dim grpName As String = “Group1” 03 Dim user As SPUser =
SPContext.Current.Web.EnsureUser(login) 04 Dim group As SPGroup =
SPContext.Current.Web.Groups(grpName) 05 06 group.Update() Which code segment should
you add at line 05?

You need to programmatically add a user named User1 to a group named Group1. You write the
following code segment. (Line numbers are included for reference only.) 01 Dim login As String =
“User1” 02 Dim grpName As String = “Group1” 03 Dim user As SPUser =
SPContext.Current.Web.EnsureUser(login) 04 Dim group As SPGroup =
SPContext.Current.Web.Groups(grpName) 05 06 group.Update() Which code segment should
you add at line 05?

A.
user.Update()

B.
user.AllowBrowseUserInfo = True

C.
group.Owner = user

D.
group.AddUser(user)

Explanation:



Leave a Reply 0

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