Share via


SPGroup.ExplicitlyContainsCurrentUser property

Gets a Boolean value that indicates whether the current user has been added explicitly as a direct member of the SharePoint Foundation group, as opposed to indirect membership through a directory group.

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

Syntax

'Declaration
Public ReadOnly Property ExplicitlyContainsCurrentUser As Boolean
    Get
'Usage
Dim instance As SPGroup
Dim value As Boolean

value = instance.ExplicitlyContainsCurrentUser
public bool ExplicitlyContainsCurrentUser { get; }

Property value

Type: System.Boolean
true if the current user is a direct member of the group; otherwise, false. If the group object contains a domain group that includes the current user but the group object does not directly include the user, this property returns false.

Remarks

The ContainsCurrentUser property considers both direct and indirect membership.

See also

Reference

SPGroup class

SPGroup members

Microsoft.SharePoint namespace