Share via


SPRoleCollection.GetCollection method

NOTE: This API is now obsolete.

Obsolete. Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, the GetCollection method returned the roles specified by an array of names from the collection and is maintained for backward compatibility.)

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

Syntax

'Declaration
<ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")> _
Public Function GetCollection ( _
    names As String() _
) As SPRoleCollection
'Usage
Dim instance As SPRoleCollection
Dim names As String()
Dim returnValue As SPRoleCollection

returnValue = instance.GetCollection(names)
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public SPRoleCollection GetCollection(
    string[] names
)

Parameters

  • names
    Type: []

    A string array that contains the names.

Return value

Type: Microsoft.SharePoint.SPRoleCollection
An SPRoleCollection object that represents the roles.

See also

Reference

SPRoleCollection class

SPRoleCollection members

Microsoft.SharePoint namespace