Microsoft.Samples.Collections

Heap.Contains Method 

Determines whether an element is in the Heap.

public virtual bool Contains(
   object obj
);

Parameters

obj
The Object to locate in the Heap. The value can be a null reference (Nothing in Visual Basic).

Return Value

true if obj is found in the Heap; otherwise, false.

Remarks

This method performs with average execution time that is linear. That is, this method is an O(n) operation, where n is Count. This method determines equality by calling Object.Equals.

See Also

Heap Class | Microsoft.Samples.Collections Namespace