Don't write your own sorting algorithm. .NET has an Array.Sort() method specifically for things such as this.
Since you have a custom object, you need to define how to compare 2 objects so the sorting algorithm knows how to sort them. You can do this 1 of 2 ways:
- Make your
CarSpecs
class implement the IComparable interface
- Create a class that implements IComparer and pass that in as a parameter to
Array.Sort()
along with your array.