DevForce Help Reference
IndexOf<T> Method (EnumerableFns)


Returns the index of the first item in the sequence matching a condition, or -1 if no match found.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Shared Function IndexOf(Of T)( _
   ByVal items As IEnumerable(Of T), _
   ByVal predicate As Func(Of T,Boolean) _
) As Integer
'Usage
 
Dim items As IEnumerable(Of T)
Dim predicate As Func(Of T,Boolean)
Dim value As Integer
 
value = EnumerableFns.IndexOf(Of T)(items, predicate)
[Extension()]
public static int IndexOf<T>( 
   IEnumerable<T> items,
   Func<T,bool> predicate
)

Parameters

items
predicate

Type Parameters

T
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EnumerableFns Class
EnumerableFns Members

Send Feedback