Compartilhar via


GroupCollection.GetById Method

Returns a group from the collection based on the member ID of the group.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
<RemoteAttribute> _
Public Function GetById ( _
    id As Integer _
) As Group
'Usage
Dim instance As GroupCollection
Dim id As Integer
Dim returnValue As Group

returnValue = instance.GetById(id)
[RemoteAttribute]
public Group GetById(
    int id
)

Parameters

  • id
    Type: System.Int32

    A 32-bit integer that specifies the member ID.

Return Value

Type: Microsoft.SharePoint.Client.Group
A Group object that represents the group.

Exceptions

Exception Condition
SPException

The group cannot be found. Error Code: -2130575246.

ArgumentException

An unknown or incorrect group collection type is to be initialized. Error Code: -2147024809.

UnauthorizedAccessException

The current user has insufficient permissions. Error Code: -2147024891.

See Also

Reference

GroupCollection Class

GroupCollection Members

Microsoft.SharePoint.Client Namespace