DesignerVerbCollection::IndexOf Method (DesignerVerb^)
.NET Framework (current version)
Gets the index of the specified DesignerVerb.
Assembly: System (in System.dll)
Parameters
- value
-
Type:
System.ComponentModel.Design::DesignerVerb^
The DesignerVerb whose index to get in the collection.
Return Value
Type: System::Int32The 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
Available since 1.1
Show: