Freigeben über


Queue.Contains-Methode

Bestimmt, ob sich ein Element in Queue befindet.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Overridable Function Contains ( _
    obj As Object _
) As Boolean
'Usage
Dim instance As Queue
Dim obj As Object
Dim returnValue As Boolean

returnValue = instance.Contains(obj)
public virtual bool Contains (
    Object obj
)
public:
virtual bool Contains (
    Object^ obj
)
public boolean Contains (
    Object obj
)
public function Contains (
    obj : Object
) : boolean

Parameter

  • obj
    Das Object, das in Queue gesucht werden soll. Der Wert kann NULL (Nothing in Visual Basic) sein.

Rückgabewert

true, wenn sich obj in Queue befindet, andernfalls false.

Hinweise

Diese Methode ruft Object.Equals für die Gleichheitsprüfung auf.

Diese Methode führt eine lineare Suche durch. Daher ist diese Methode eine O(n)-Operation, wobei nCount ist.

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, 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

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

Queue-Klasse
Queue-Member
System.Collections-Namespace

Weitere Ressourcen

Durchführen kulturunabhängiger Zeichenfolgenoperationen