Share via


SPRoleCollection.Count property

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 Count property returned the number of roles in 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 Overrides ReadOnly Property Count As Integer
    Get
'Usage
Dim instance As SPRoleCollection
Dim value As Integer

value = instance.Count
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public override int Count { get; }

Property value

Type: System.Int32
A 32-bit integer that indicates the number of roles.

Implements

ICollection.Count

See also

Reference

SPRoleCollection class

SPRoleCollection members

Microsoft.SharePoint namespace