Maha

Maha

  • NA
  • 0
  • 323.9k

Alphanumeric sorting

Aug 24 2012 10:08 PM
This program is in the following website but not working. Please fix the error.
http://www.dotnetperls.com/alphanumeric-sorting


using System;
using System.Collections;

class Program
{
static void Main()
{
string[] highways = new string[]
{
"100F",
"50F",
"SR100",
"SR9"
};
//
// We want to sort a string[] array called highways in an
// alphanumeric way. Call the static Array.Sort method.
//
Array.Sort(highways, new AlphanumComparatorFast());
//
// Display the results
//
foreach (string h in highways)
{
Console.WriteLine(h);
}
}
}


Answers (2)