Export (0) Print
Expand All

ListView.ColumnHeaderCollection.IndexOf Method

Returns the index within the collection of the specified column header.

[Visual Basic]
Public Function IndexOf( _
   ByVal value As ColumnHeader _
) As Integer
public int IndexOf(
 ColumnHeader value
public: int IndexOf(
 ColumnHeader* value
public function IndexOf(
   value : ColumnHeader
) : int;


A ColumnHeader representing the column header to locate in the collection.

Return Value

The zero-based index of the column header's location in the collection. If the column header is not located in the collection, the return value is negative one (-1).


The IndexOf method enables you to determine the position of a column header in the collection. To determine whether a column header is contained in the collection before calling this method, use the Contains method.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ListView.ColumnHeaderCollection Class | ListView.ColumnHeaderCollection Members | System.Windows.Forms Namespace | Contains

© 2014 Microsoft