GH_ListUtil.FirstNonNullItem(T) Method

GH_ListUtilFirstNonNullItemT Method

Returns the index of the first non-null item in a list.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static int FirstNonNullItem<T>(
	List<T> L
)
Public Shared Function FirstNonNullItem(Of T) ( 
	L As List(Of T)
) As Integer

Parameters

L
Type: System.Collections.GenericListT
List to parse.

Type Parameters

T
Type of list

Return Value

Type: Int32
The index of the first non-null item or -1 if no object reference could be found.
See Also