Freigeben über


ToolboxItemCollection.Contains-Methode

Gibt an, ob die Auflistung das angegebene ToolboxItem enthält.

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

Syntax

'Declaration
Public Function Contains ( _
    value As ToolboxItem _
) As Boolean
'Usage
Dim instance As ToolboxItemCollection
Dim value As ToolboxItem
Dim returnValue As Boolean

returnValue = instance.Contains(value)
public bool Contains (
    ToolboxItem value
)
public:
bool Contains (
    ToolboxItem^ value
)
public boolean Contains (
    ToolboxItem value
)
public function Contains (
    value : ToolboxItem
) : boolean

Parameter

  • value
    Ein ToolboxItem, nach dem die Auflistung durchsucht werden soll.

Rückgabewert

true, wenn die Auflistung das angegebene Objekt enthält, andernfalls false.

Beispiel

Im folgenden Codebeispiel wird die Verwendung der Contains-Methode von ToolboxItemCollection veranschaulicht.

' 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
// 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 );

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ToolboxItemCollection-Klasse
ToolboxItemCollection-Member
System.Drawing.Design-Namespace