ToolboxItemCollection.Contains(ToolboxItem) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Anger om samlingen innehåller den angivna ToolboxItem.
public:
bool Contains(System::Drawing::Design::ToolboxItem ^ value);
public bool Contains(System.Drawing.Design.ToolboxItem value);
member this.Contains : System.Drawing.Design.ToolboxItem -> bool
Public Function Contains (value As ToolboxItem) As Boolean
Parametrar
- value
- ToolboxItem
A ToolboxItem att söka i samlingen efter.
Returer
trueom samlingen innehåller det angivna objektet; annars . false
Exempel
Följande kodexempel visar hur du använder Contains metoden för en 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 );
// 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 );
' If the collection contains the specified ToolboxItem,
' retrieve the collection index of the specified item.
Dim indx As Integer = -1
If collection.Contains(item) Then
indx = collection.IndexOf(item)
End If