IComprable interface.
All of the primitive data types in .NET - String, Integer, Double, etc. - implement
IComparable and therefore arrays of these types can be sorted using
Array.Sort(ArrayName).
Unsorted List of Random Numbers
| 92 |
| 1 |
| 30 |
| 13 |
| 80 |
| 20 |
| 83 |
| 39 |
| 25 |
| 37 |
| 94 |
Sorted List of Random Numbers
| 1 |
| 13 |
| 20 |
| 25 |
| 30 |
| 37 |
| 39 |
| 80 |
| 83 |
| 92 |
| 94 |
Source Code
|