ListView::ColumnHeaderCollection::Item Property (Int32)

 

Gets the column header at the specified index within the collection.

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

public:
property ColumnHeader^ default[
	int index
] {
	virtual ColumnHeader^ get(int index);
}

Parameters

index
Type: System::Int32

The index of the column header to retrieve from the collection.

Property Value

Type: System.Windows.Forms::ColumnHeader^

A ColumnHeader representing the column header located at the specified index within the collection.

Exception Condition
ArgumentOutOfRangeException

index is less than 0 or greater than or equal to the value of the Count property of the ListView::ColumnHeaderCollection.

You can use this method to obtain the ColumnHeader stored at a specific location in the collection. To determine the index of a specific column header in the collection, use the IndexOf method.

.NET Framework
Available since 1.1
Return to top
Show: