Edit

Share via


ListView.ColumnHeaderCollection.Item[] Property

Definition

Gets a column header from the collection.

Overloads

Item[Int32]

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

Item[String]

Gets the column header with the specified key from the collection.

Item[Int32]

Source:
ListView.ColumnHeaderCollection.cs
Source:
ListView.ColumnHeaderCollection.cs
Source:
ListView.ColumnHeaderCollection.cs

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

public:
 virtual property System::Windows::Forms::ColumnHeader ^ default[int] { System::Windows::Forms::ColumnHeader ^ get(int index); };
public virtual System.Windows.Forms.ColumnHeader this[int index] { get; }
member this.Item(int) : System.Windows.Forms.ColumnHeader
Default Public Overridable ReadOnly Property Item(index As Integer) As ColumnHeader

Parameters

index
Int32

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

Property Value

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

Exceptions

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

Remarks

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.

See also

Applies to

Item[String]

Source:
ListView.ColumnHeaderCollection.cs
Source:
ListView.ColumnHeaderCollection.cs
Source:
ListView.ColumnHeaderCollection.cs

Gets the column header with the specified key from the collection.

public:
 virtual property System::Windows::Forms::ColumnHeader ^ default[System::String ^] { System::Windows::Forms::ColumnHeader ^ get(System::String ^ key); };
public virtual System.Windows.Forms.ColumnHeader this[string key] { get; }
member this.Item(string) : System.Windows.Forms.ColumnHeader
Default Public Overridable ReadOnly Property Item(key As String) As ColumnHeader

Parameters

key
String

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

Property Value

The ColumnHeader with the specified key.

Remarks

The key comparison is not case-sensitive. If key is null or an empty string, Item[] returns null.

Applies to