for (int i = 0; i<24; i++) //just user the static array length { myStudents[i].Number = Console.ReadLine(); myStudents[i].Name = Console.ReadLine(); }