SPRoleCollection.GetByID 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 GetByID method returned the role with the specified member ID 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 Function GetByID ( _
id As Integer _
) As SPRole
'Usage
Dim instance As SPRoleCollection
Dim id As Integer
Dim returnValue As SPRole
returnValue = instance.GetByID(id)
[ObsoleteAttribute("Use the SPRoleDefinitionCollection class instead")]
public SPRole GetByID(
int id
)
Parameters
id
Type: System.Int32A 32-bit integer that specifies the member ID.
Return value
Type: Microsoft.SharePoint.SPRole
An SPRole object that represents the role.
Remarks
The value of the id parameter corresponds to the unique member ID for the role, which is contained in the ID property of the SPMember class.