Export (0) Print
Expand All

ListViewItem.ListViewSubItemCollection.Item Property

Gets or sets the subitem at the specified index within the collection.

[C#] In C#, this property is the indexer for the ListViewItem.ListViewSubItemCollection class.

[Visual Basic]
Public Default Property Item( _
   ByVal index As Integer _
) As ListViewItem.ListViewSubItem
public ListViewItem.ListViewSubItem this[
 int index
] {get; set;}
public: __property ListViewItem.ListViewSubItem* get_Item(
 int index
public: __property void set_Item(
 int index,
returnValue = ListViewSubItemCollectionObject.Item(index);
ListViewSubItemCollectionObject.Item(index) = returnValue;
returnValue = ListViewSubItemCollectionObject(index);
ListViewSubItemCollectionObject(index) = returnValue;

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [JScript]

The index of the item in the collection to retrieve.

Parameters [Visual Basic, C#, C++]

The index of the item in the collection to retrieve.

Property Value

A ListViewItem.ListViewSubItem representing the subitem located at the specified index within the collection.


Exception Type Condition
ArgumentOutOfRangeException The index parameter is less than zero or greater than or equal to the value of the Count property of the ListViewItem.ListViewSubItemCollection.


You can use this method to obtain the ListViewItem.ListViewSubItem stored at a specific location in the collection. To determine the index of a specific item in the collection, use the IndexOf method.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ListViewItem.ListViewSubItemCollection Class | ListViewItem.ListViewSubItemCollection Members | System.Windows.Forms Namespace

© 2014 Microsoft