Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToolboxItemCollection::Contains Method (ToolboxItem^)

 

Indicates whether the collection contains the specified ToolboxItem.

Namespace:   System.Drawing.Design
Assembly:  System.Drawing (in System.Drawing.dll)

public:
bool Contains(
	ToolboxItem^ value
)

Parameters

value
Type: System.Drawing.Design::ToolboxItem^

A ToolboxItem to search the collection for.

Return Value

Type: System::Boolean

true if the collection contains the specified object; otherwise, false.

The following code example demonstrates using the Contains method of a ToolboxItemCollection.

// If the collection contains the specified ToolboxItem, 
// retrieve the collection index of the specified item.
int indx = -1;
if ( collection->Contains( item ) )
   indx = collection->IndexOf( item );

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft