共用方式為


SPUtility.GetPrincipalsInGroup method

會取得對指定之群組的使用者或群組。指定的群組可以是 Microsoft Windows 安全性群組、 ASP.NET角色或 SharePoint 群組。

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

Syntax

'宣告
<DirectoryServicesPermissionAttribute(SecurityAction.Assert, Unrestricted := True)> _
Public Shared Function GetPrincipalsInGroup ( _
    web As SPWeb, _
    input As String, _
    maxCount As Integer, _
    <OutAttribute> ByRef reachedMaxCount As Boolean _
) As SPPrincipalInfo()
'用途
Dim web As SPWeb
Dim input As String
Dim maxCount As Integer
Dim reachedMaxCount As Boolean
Dim returnValue As SPPrincipalInfo()

returnValue = SPUtility.GetPrincipalsInGroup(web, _
    input, maxCount, reachedMaxCount)
[DirectoryServicesPermissionAttribute(SecurityAction.Assert, Unrestricted = true)]
public static SPPrincipalInfo[] GetPrincipalsInGroup(
    SPWeb web,
    string input,
    int maxCount,
    out bool reachedMaxCount
)

參數

  • maxCount
    Type: System.Int32

    若要傳回的成員數目上限。

  • reachedMaxCount
    Type: System.Boolean

    資訊是否已達到的成員數目上限。

傳回值

Type: []
true如果有多個成員未傳回 ;否則,請false。

Exceptions

Exception Condition
ArgumentNullException

web或input參數,則a null reference (Nothing in Visual Basic)。

ArgumentException

maxCount參數小於 0。

請參閱

參照

SPUtility class

SPUtility members

Microsoft.SharePoint.Utilities namespace