public static void Main()
int[] sourceArray = { 12, 7, 32, 8, 6, 5, 4, 19, 15, 5 };
Console.WriteLine( "Original values:" );
PrintValues(sourceArray);
Console.WriteLine( "Values after calling Sort method:" );
PrintValues(sourceArray);
public static void PrintValues(Array myArr)
int cols = myArr.GetLength(myArr.Rank - 1);
foreach (object o in myArr)
Console.Write( "\t{0}", o);