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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

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

value = instance.Item(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