Share via


SPGroupCollection.Item property (Int32)

Gets the group object at the specified index in the collection.

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

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    index As Integer _
) As SPGroup
    Get
'Usage
Dim instance As SPGroupCollection
Dim index As Integer
Dim value As SPGroup

value = instance(index)
public SPGroup this[
    int index
] { get; }

Parameters

  • index
    Type: System.Int32

    A 32-bit integer that specifies the index.

Property value

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

Exceptions

Exception Condition
ArgumentOutOfRangeException

Thrown if the specified index is outside the valid range of indexes for the collection.

Remarks

In C#, this property is an indexer for the SPGroupCollection class.

See also

Reference

SPGroupCollection class

SPGroupCollection members

Item overload

Microsoft.SharePoint namespace