public static void Main()
Console.WriteLine("How many people are in your class? ");
string answer = Console.ReadLine();
if (int.TryParse(answer, out classSize))
string[] students = new string[classSize];
for(int i = 0; i < classSize; i++)
{Console.WriteLine("Please enter person "+ (i+1));
students[i] = Console.ReadLine();
Console.WriteLine("The people in your class in alphabetical order are: " );
foreach(string name in students)
Console.Write(name+ " ");
Console.WriteLine("Error: you entered something invalid");