SPGroupCollection.GetByName method

Returns a cross-site group from the collection based on the name of the group.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)


Public Function GetByName ( _
    name As String _
) As SPGroup
Dim instance As SPGroupCollection
Dim name As String
Dim returnValue As SPGroup

returnValue = instance.GetByName(name)
public SPGroup GetByName(
    string name


Return value

Type: Microsoft.SharePoint.SPGroup
An SPGroup object that represents the group.


The name parameter value corresponds to the group name for the cross-site group, which is contained in the Microsoft.SharePoint.SPMember class.

See also


SPGroupCollection class

SPGroupCollection members

Microsoft.SharePoint namespace