ListView::ListViewItemCollection::GetEnumerator Method ()

 

Returns an enumerator to use to iterate through the item collection.

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

public:
virtual IEnumerator^ GetEnumerator() sealed

Return Value

Type: System.Collections::IEnumerator^

An IEnumerator that represents the item collection.

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
Return to top
Show: