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)
Available in Sandboxed Solutions: No

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