GetSpecialRole Method
The GetSpecialRole method of the SPRoleCollection class returns a system site group specified by its type.
Parameters
roleType A Microsoft.SharePoint.SPRoleType value that specifies the type.
Return Value
A Microsoft.SharePoint.SPRole object that represents the site group.
Example
The following code example uses the GetSpecialRole method to add a specified user to the Reader site group on the current site.
This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.
The example assumes the existence of a .aspx page that contains a label control.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security