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.

DesignerVerbCollection::IndexOf Method (DesignerVerb^)

 

Gets the index of the specified DesignerVerb.

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

public:
int IndexOf(
	DesignerVerb^ value
)

Parameters

value
Type: System.ComponentModel.Design::DesignerVerb^

The DesignerVerb whose index to get in the collection.

Return Value

Type: System::Int32

The index of the specified object if it is found in the list; otherwise, -1.

The following code example demonstrates how to test for the presence of a DesignerVerb in a DesignerVerbCollection.

// Tests for the presence of a DesignerVerb in the collection,
// and retrieves its index if it is found.
DesignerVerb^ testVerb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
int itemIndex = -1;
if ( collection->Contains( testVerb ) )
         itemIndex = collection->IndexOf( testVerb );

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