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)
Syntax
'Declaration
Public Function GetByName ( _
name As String _
) As SPGroup
'Usage
Dim instance As SPGroupCollection
Dim name As String
Dim returnValue As SPGroup
returnValue = instance.GetByName(name)
public SPGroup GetByName(
string name
)
Parameters
name
Type: System.StringThe group name.
Return value
Type: Microsoft.SharePoint.SPGroup
An SPGroup object that represents the group.
Remarks
The name parameter value corresponds to the group name for the cross-site group, which is contained in the Microsoft.SharePoint.SPMember class.