ListView.ColumnHeaderCollection.Item Property (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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 virtual ColumnHeader this[
	int index
] { get; }

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: