ListView::ListViewItemCollection::GetEnumerator Method ()
.NET Framework (current version)
Returns an enumerator to use to iterate through the item collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Return Value
Type: System.Collections::IEnumerator^An IEnumerator that represents the item collection.
Implements
IEnumerable::GetEnumerator()| Exception | Condition |
|---|---|
| InvalidOperationException | The owner ListView is in virtual mode. |
When the owner ListView is in virtual mode, you cannot enumerate through the ListView::ListViewItemCollection using an enumerator or call GetEnumerator. Instead, use the ListView::Items property to access an item by index value.
.NET Framework
Available since 1.1
Available since 1.1
Show: