using System;
using System.Linq;
public class Program
{
public static void Main()
string[] animals = { "Cat", "Alligator", "Fox", "Donkey", "Bear", "Elephant", "Goat" };
var sortedStr = from name in animals
orderby name
select name;
Array.ForEach<string>(sortedStr.ToArray<string>(), s => Console.WriteLine(s));
}