why can't you use Array.Sort(myArray) directly??
It sorts the elements in an entire one-dimensional Array using the IComparable implementation of each element of the Array.