Share via


SPChangeQuery.GroupMembershipAdd property

Gets or sets a Boolean value that specifies whether changes that add users to groups are included in the query.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property GroupMembershipAdd As Boolean
    Get
    Set
'Usage
Dim instance As SPChangeQuery
Dim value As Boolean

value = instance.GroupMembershipAdd

instance.GroupMembershipAdd = value
public bool GroupMembershipAdd { get; set; }

Property value

Type: System.Boolean
true to include changes that add users to groups; otherwise, false. The default is false.

Remarks

The following code constructs a query for changes that modify group membership.

Dim query As New SPChangeQuery(False, False)

' object type 
query.Group = True

' change types 
query.GroupMembershipAdd = True
query.GroupMembershipDelete = True
SPChangeQuery query = new SPChangeQuery(false, false); 

// object type 
query.Group = true;

// change types 
query.GroupMembershipAdd = true;
query.GroupMembershipDelete = true;

See also

Reference

SPChangeQuery class

SPChangeQuery members

Microsoft.SharePoint namespace