共用方式為


SPGroup.ExplicitlyContainsCurrentUser property

取得布林值,這個值,指出目前的使用者是否已明確地SharePoint Foundation群組,而不是間接透過目錄群組的成員資格的直接成員身分加入。

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

Syntax

'宣告
Public ReadOnly Property ExplicitlyContainsCurrentUser As Boolean
    Get
'用途
Dim instance As SPGroup
Dim value As Boolean

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

Property value

Type: System.Boolean
true如果現行使用者是直接隸屬的群組。否則, false。如果群組物件包含網域群組,其中包含目前的使用者,但群組物件不直接包含使用者,則這個屬性會傳回false。

備註

ContainsCurrentUser屬性會考慮直接和間接的成員資格。

請參閱

參照

SPGroup class

SPGroup members

Microsoft.SharePoint namespace