Version

InsertionIndex<T>(IList<T>,T) Method

Returns the insertion index for an element in a sorted list.
Syntax
'Declaration
 
Public Overloads Shared Function InsertionIndex(Of T As IComparable)( _
   ByVal collection As IList(Of T), _
   ByVal value As T _
) As Integer
public static int InsertionIndex<T>( 
   IList<T> collection,
   T value
)
where T: IComparable

Parameters

collection
value

Type Parameters

T

Return Value

Insertion index for the specified value.
Remarks
The list must be sorted in ascending order prior to calling this method.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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