Program MyProgram;
MyProgram = new Program();
string[] namearr = new string[4] ;
for (MyProgram.j = 0; MyProgram.j< namearr.Length; MyProgram.j++)
{
Console.WriteLine("姓名:", namearr[MyProgram.j]);
}
int[] scorearr = new int[4];
for (MyProgram.i = 0; MyProgram.i < scorearr.Length; MyProgram.i++)
Console.WriteLine("成績:", scorearr[MyProgram.i]);
MyProgram.Setnamearr(namearr);
MyProgram.Class = "09地信2";
MyProgram.Setscorearr(scorearr);
MyProgram.Object = "英語";
Console.WriteLine("班級:",MyProgram.Class);
Console.WriteLine("科目:", MyProgram.Object);
Console.ReadLine();//除錯結果檢視,輸入任意值退出
改了這段程式碼就行了
Program MyProgram;
MyProgram = new Program();
string[] namearr = new string[4] ;
for (MyProgram.j = 0; MyProgram.j< namearr.Length; MyProgram.j++)
{
Console.WriteLine("姓名:", namearr[MyProgram.j]);
}
int[] scorearr = new int[4];
for (MyProgram.i = 0; MyProgram.i < scorearr.Length; MyProgram.i++)
{
Console.WriteLine("成績:", scorearr[MyProgram.i]);
}
MyProgram.Setnamearr(namearr);
MyProgram.Class = "09地信2";
MyProgram.Setscorearr(scorearr);
MyProgram.Object = "英語";
Console.WriteLine("班級:",MyProgram.Class);
Console.WriteLine("科目:", MyProgram.Object);
Console.ReadLine();//除錯結果檢視,輸入任意值退出
}
改了這段程式碼就行了