You create an audience named Sales. You need to create a custom web part that displays a control to members of the Sales audience only.
Which code segment should you use?
A.
Dim am as New AudienceManager(ServerContext.Current)
Dim currentUserIsSales as Boolean =
am.GetAudience(“Sales”).IsMember(SPContext.Current.Web.CurrentUser.LogInName)
B.
Dim am as New AudienceMember(ServerContext.Current)
Dim currentUserIsSales as Boolean =
am.GetAudience(“Sales”).AudienceRules.Contains(SPContext.Current.Web.CurrentUser.LogInName)
C.
Dim currentUserIsSales as Boolean = SPContext.Current.Web.CurrentUser.OwnedGroup(“Sales”) is not Nothing
D.
Dim currentUserIsSales as Boolean = SPContext.Current.Web.SiteGroups(“Sales”).ContainsCurrentUser