Exemplo n.º 1
0
 public static void sort(names[] Lastname)
 {
     for (int i = 0; i < Lastname.Length - 1; i++)
     {
         for (int pos = 0; pos < Lastname.Length - 1; pos++)
         {
             if (Lastname[pos + 1].lname.CompareTo(Lastname[pos].lname) < 0)
             {
                 names temp = Lastname[pos + 1];
                 Lastname[pos + 1] = Lastname[pos];
                 Lastname[pos]     = temp;
             }
         }
     }
 }
Exemplo n.º 2
0
 static void Main()
 {
     Console.SetWindowSize(160, 40);
     Console.OutputEncoding = System.Text.Encoding.UTF8;
     string[] Finalll   = new string[1];
     string[] Finalists = new string[10];
     string[] Finaly    = new string[10];
     names[]  Lastname  = new names[30];
     welcome();
     read(Lastname);
     sort(Lastname);
     Greeting();
     options();
     menu(Lastname, Finalists, Finalll);
     Lotto(Lastname);
     Console.ReadLine();
 }