Which code segment should you implement in the Web Part?

You need to create a Web Part that creates a copy of the out-of-the box Contribute permission
level. Which code segment should you implement in the Web Part?

You need to create a Web Part that creates a copy of the out-of-the box Contribute permission
level. Which code segment should you implement in the Web Part?

A.
Dim myRole As New
SPRoleDefinition(SPContext.Current.Web.RoleDefinitions(“MyContribute”)) myRole.Description =
“Contribute” SPContext.Current.Web.RoleDefinitions.Add(myRole)

B.
Dim myRole As New
SPRoleDefinition(SPContext.Current.Web.RoleDefinitions(“MyContribute”)) myRole.Name =
“Contribute” SPContext.Current.Web.RoleDefinitions.Add(myRole)

C.
Dim myRole As New SPRoleDefinition() myRole.Name = “Contribute”
SPContext.Current.Web.RoleDefinitions.Add(myRole)

D.
Dim myRole As New SPRoleDefinition(SPContext.Current.Web.RoleDefinitions(“Contribute”))
myRole.Name = “MyContribute” SPContext.Current.Web.RoleDefinitions.Add(myRole)



Leave a Reply 0

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