Microsoft.Samples.Collections

Heap Methods

The methods of the Heap class are listed below. For a complete list of Heap class members, see the Heap Members topic.

Public Static Methods

Synchronized Returns a synchronized (thread-safe) wrapper for the Heap.

Public Instance Methods

Add Add an object to the heap maintaining its heap properties
Clear Removes all elements from the Heap.
Clone Create a copy of the heap containing the same object references
Contains Determines whether an element is in the Heap.
CopyTo Copy all the elements stored on the current heap to the specified one-dimensional array starting at the specified index
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
Extract Extract returns the highest value object from the heap
GetEnumerator Returns an enumerator that can iterate through the heap in an unordered fashion.
GetHashCode (inherited from Object)Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetObjectData Populates a SerializationInfo with the data needed to serialize the heap.
GetType (inherited from Object)Gets the Type of the current instance.
IsEmpty Test whether the heap is empty of elements.
Peek Look at the element at the top of the heap without removing it.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

Explicit Interface Implementations

ICloneable.Clone Create a copy of the heap containing the same object references
IEnumerable.GetEnumerator Returns an enumerator that can iterate through the heap in an unordered fashion.

See Also

Heap Class | Microsoft.Samples.Collections Namespace