Share via


EntitySet<TEntity>.IndexOf Method (TEntity)

Returns the zero-based index of the first occurrence of the specified entity in the collection.

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

Syntax

'Declaration
Public Function IndexOf ( _
    entity As TEntity _
) As Integer
'Usage
Dim instance As EntitySet
Dim entity As TEntity
Dim returnValue As Integer

returnValue = instance.IndexOf(entity)
public int IndexOf(
    TEntity entity
)

Parameters

  • entity
    Type: TEntity

    The entity whose index is returned.

Return Value

Type: System.Int32
A Int32 that represents the zero-based index of the specified entity in the EntitySet<TEntity>.

Implements

IList<T>.IndexOf(T)

See Also

Reference

EntitySet<TEntity> Class

EntitySet<TEntity> Members

IndexOf Overload

Microsoft.SharePoint.Linq Namespace