You are on page 1of 1

using System;

public class ReverseArraySort


{
public static void Main()
{
for (int i = 0; i < 50;i++)
{
string[] strings = { "beta", "alpha", "gamma" };
Console.WriteLine("Array elements: ");
DisplayArray(strings);
Array.Sort(strings); // Sort elements
DisplayArray(strings);
}
public static void DisplayArray(Array array)
{
foreach (object o in array)
{
Console.Write("{0} ", o);
}
Console.WriteLine();
Console.ReadLine();
}
}

You might also like