ListView.CheckedListViewItemCollection.Item[] Property

Definition

Gets an item within the collection.

Overloads

Item[String]

Gets an item with the specified key within the collection.

Item[Int32]

Gets the item at the specified index within the collection.

Item[String]

Source:
ListView.CheckedListViewItemCollection.cs
Source:
ListView.CheckedListViewItemCollection.cs
Source:
ListView.CheckedListViewItemCollection.cs

Gets an item with the specified key within the collection.

C#
public virtual System.Windows.Forms.ListViewItem this[string key] { get; }

Parameters

key
String

The key of the item in the collection to retrieve.

Property Value

A ListViewItem representing the item with the specified index within the collection.

Exceptions

The owner ListView is in virtual mode.

Remarks

Item[] returns null if the key parameter is null or empty.

The Name property corresponds to the key for an item in the ListView.CheckedListViewItemCollection.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

Item[Int32]

Source:
ListView.CheckedListViewItemCollection.cs
Source:
ListView.CheckedListViewItemCollection.cs
Source:
ListView.CheckedListViewItemCollection.cs

Gets the item at the specified index within the collection.

C#
public System.Windows.Forms.ListViewItem this[int index] { get; }

Parameters

index
Int32

The index of the item in the collection to retrieve.

Property Value

A ListViewItem representing the item located at the specified index within the collection.

Exceptions

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

The ListView is in virtual mode.

Remarks

This indexer enables you to get a specific item from the ListView.CheckedListViewItemCollection. The item stored in this collection is an item in the ListView.ListViewItemCollection of the ListView that represents a checked item in the ListView.

Applies to

.NET Framework 4.8.1 och andra versioner
Produkt Versioner
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10