Heap.ctor(T[], HeapType) modifies the provided array, and uses it for internal representation! This is a disaster of epic proportions! You've ruined the user's data, and now they can return the favour by corrupting your heap! Even more fun, because RemoveAt<T>(int) creates a new array (which is an O(n)\$O(n)\$ operation, and exactly something that Heaps are meant to avoid) this behaviour will change when Add is called. You should be using a List<T>, not an array, and you should be creating it yourself, not accepting it from in a constructor.