SPRole.Groups Property

NOTE: This API is now 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 Groups property returned the collection of groups that are assigned to the role 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 SPRoleDefinition class instead")> _
Public ReadOnly Property Groups As SPGroupCollection
    Get
'Usage
Dim instance As SPRole
Dim value As SPGroupCollection

value = instance.Groups
[ObsoleteAttribute("Use the SPRoleDefinition class instead")]
public SPGroupCollection Groups { get; }

Property Value

Type: Microsoft.SharePoint.SPGroupCollection
An SPGroupCollection object that represents the groups.

See Also

Reference

SPRole Class

SPRole Members

Microsoft.SharePoint Namespace