The methods of the Heap class are listed below. For a complete list of Heap class members, see the Heap Members topic.
![]() Synchronized | Returns a synchronized (thread-safe) wrapper for the Heap. |
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. |
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. |
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. |
Heap Class | Microsoft.Samples.Collections Namespace