How to write nested generic function
<p>I am trying to write a generic Heap Sort algorithm. I get the following error. What could be the reason?</p>

<blockquote>
  <p>The type <code>T</code> cannot be used as type parameter <code>T</code> in the generic type
  or method <code>Heap.MainClass.MaxHeapify&lt;T&gt;(T[], int, int)</code>. There is no
  boxing or type parameter conversion from <code>T</code> to
  <code>System.IComparable&lt;T&gt;</code> (CS0314) (HeapSort)</p>
</blockquote>
