Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string            na  = Convert.ToString(textBox1.Text);
            int               ag  = Convert.ToInt32(textBox2.Text);
            double            chi = Convert.ToDouble(textBox3.Text);
            double            mat = Convert.ToDouble(textBox4.Text);
            double            eng = Convert.ToDouble(textBox5.Text);
            double            num = Student.number;
            highSchoolStudent msg = new highSchoolStudent(na, ag, chi, mat, eng);

            DisplayhighSchoolStudent(msg);
        }
Beispiel #2
0
 public void DisplayhighSchoolStudent(highSchoolStudent s)
 {
     textBox6.Text += "总人数:" + highSchoolStudent.number + ",姓名:" + s.Name + ",平均成绩:" + s.Average() + "\r\n";
 }