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