FindIndex<T>(IList<T>,Boolean,IComparable,SearchMode) Method
Finds the index of the item in the List according to the desired SearchMode. If isSorted is true, uses fast binary search
Syntax
[Extension()] public static int FindIndex<T>( IList<T> list, bool isSorted, IComparable value, SearchMode searchMode ) where T: IComparable
Parameters
- list
- The list to search
- isSorted
- If true, will use fast binary search
- value
- The value to find the index for
- searchMode
- The SearchMode options
Type Parameters
- T
- The type of the list
Return Value
The found index, or -1 if not found
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