C#程序存储学生成绩

时间:2019-06-24 01:37:42

标签: c#

我是C#的新手,想帮助我解决null引用异常,该怎么办?

 Grade[] g1 = new Grade[10];// programming
        Grade[] g2 = new Grade[10]; 
        Grade[] g3 = new Grade[10]; 
        Grade[] g4 = new Grade[10]; 
        Grade[] g5 = new Grade[10]; 



        // enter grades for students
        for (int i = 0; i < s.Length; i++)
        {

            // course 1
            Console.Write Line("Course : Programing of student\t:" + s[i]. First Name);
            Console.Write Line("Enter attendance mark:");
            g1[i]. Attendance = Convert.To Double(Console.Read Line());

//在这里,我例外了

0 个答案:

没有答案