SPWeb.Roles Property

NOTE: This API is now obsolete.

Use the RoleDefinitions property to get the collection of role definitions for a website. In Windows SharePoint Services 2.0, the Roles property was used to get the collection of site groups on the website.

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

Syntax

'Declaration
<ObsoleteAttribute("Use the RoleDefinitions property instead")> _
Public ReadOnly Property Roles As SPRoleCollection
    Get
'Usage
Dim instance As SPWeb
Dim value As SPRoleCollection

value = instance.Roles
[ObsoleteAttribute("Use the RoleDefinitions property instead")]
public SPRoleCollection Roles { get; }

Property Value

Type: Microsoft.SharePoint.SPRoleCollection
An SPRoleCollection object that represents the site groups.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace