ListViewItem.ListViewSubItemCollection.Contains Method (ListViewItem.ListViewSubItem)


Determines whether the specified subitem is located in the collection.

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

public bool Contains(
	ListViewItem.ListViewSubItem subItem


Type: System.Windows.Forms.ListViewItem.ListViewSubItem

A ListViewItem.ListViewSubItem representing the subitem to locate in the collection.

Return Value

Type: System.Boolean

true if the subitem is contained in the collection; otherwise, false.

The Contains method enables you to determine whether a ListViewItem.ListViewSubItem is a member of the collection. Once you know that the subitem is in the collection, you can use the IndexOf method to determine the position of the subitem in the collection.

.NET Framework
Available since 1.1
Return to top