Partilhar via


SPList.GetItemsWithUniquePermissions Method (Int32, Boolean)

Returns a collection of SPListItemInfo objects for items that have unique permissions by specifying the maximum number of items to return and whether to return only folder information.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.CollectionOfSPTypesReturnType)> _
Public Function GetItemsWithUniquePermissions ( _
    maxItemToReturn As Integer, _
    folderOnly As Boolean _
) As Collection(Of SPListItemInfo)
'Usage
Dim instance As SPList
Dim maxItemToReturn As Integer
Dim folderOnly As Boolean
Dim returnValue As Collection(Of SPListItemInfo)

returnValue = instance.GetItemsWithUniquePermissions(maxItemToReturn, _
    folderOnly)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.CollectionOfSPTypesReturnType)]
public Collection<SPListItemInfo> GetItemsWithUniquePermissions(
    int maxItemToReturn,
    bool folderOnly
)

Parameters

  • maxItemToReturn
    Type: System.Int32

    The max number of items to return.

  • folderOnly
    Type: System.Boolean

    true to return only information about items that represent an SPFolder object; false to return information about all items, including folders.

Return Value

Type: System.Collections.ObjectModel.Collection<SPListItemInfo>
A collection of SPListItemInfo objects with basic information about the list items. If no list items have unique permissions, an empty collection is returned.

See Also

Reference

SPList Class

SPList Members

GetItemsWithUniquePermissions Overload

Microsoft.SharePoint Namespace