IndexOf Method

ListViewGroupCollection.IndexOf Method (ListViewGroup)

 

Returns the index of the specified ListViewGroup within the collection.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public int IndexOf(
	ListViewGroup value
)

Parameters

value
Type: System.Windows.Forms.ListViewGroup

The ListViewGroup to locate in the collection.

Return Value

Type: System.Int32

The zero-based index of the group within the collection, or -1 if the group is not in the collection.

Use this method to determine the index of a group within the collection. This is useful, for example, to determine the index of each group when you iterate through the collection using the IEnumerator returned by the GetEnumerator method.

.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft