Compartilhar via


SiteGroups Property

The SiteGroups property of the SPWeb class gets the collection of cross-site groups for the site collection.

Property Value

A Microsoft.SharePoint.SPGroupCollection object that represents the groups.

Example

The following code example uses the SiteGroups property to return the collection of cross-site groups for the current site collection and displays the name of each group.

This example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint, Microsoft.SharePoint.Utilities, and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security