Ok well .NET definately makes sorting Arrays easy. I have a quick question though if anyone knows.
I am using the Array type .Sort function to sort my array.
By default it places the result Array into Ascending order Least to Greatest
How do I change that to Descending order Greatest to Least?
and
How do I change it to Closest to logic? or does that not exist?
Assume there is an Array of Numbers 0,13,21,-2,4,5,1.34 and I want them to sort closest to 0 or some other arbitray value; the Output should look similar to:
0,1.34,-2,4,5,13,21
Is there anyway of doing this? or do I have to write the routine?
I am using the Array type .Sort function to sort my array.
By default it places the result Array into Ascending order Least to Greatest
How do I change that to Descending order Greatest to Least?
and
How do I change it to Closest to logic? or does that not exist?
Assume there is an Array of Numbers 0,13,21,-2,4,5,1.34 and I want them to sort closest to 0 or some other arbitray value; the Output should look similar to:
0,1.34,-2,4,5,13,21
Is there anyway of doing this? or do I have to write the routine?