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
| 65 |
| 84 |
| 11 |
| 65 |
| 22 |
| 74 |
| 6 |
| 79 |
| 3 |
| 59 |
| 83 |
Sorted List of Random Numbers
| 3 |
| 6 |
| 11 |
| 22 |
| 59 |
| 65 |
| 65 |
| 74 |
| 79 |
| 83 |
| 84 |
Source Code
|