static void Main(string[] args) { string name, number; double score; int i; Student[] student = new Student[3]; for (i = 0; i < 3; i++) { Console.WriteLine("第{0}个学生", (i + 1)); Console.Write("name: "); name = Console.ReadLine(); Console.Write("number: "); number = Console.ReadLine(); Console.Write("score: "); score = Convert.ToDouble(Console.ReadLine()); student[i] = new Student(name, number, score); } for (i = 0; i < 3; i++) { student[i].printInfo(); } Student.printAll(); Console.ReadKey(); }