no overload for method "ReadLine" takes 3 arguments
如下代码编译,为何总是提示:
no overload for method "ReadLine" takes 3 arguments
string[] name = new string[5];
int[] score = new int[5];
Console.Write("请输入同学们的姓名:");
//Console.ReadLine();
Console.Write("请输入同学们的分数:");
//score[] = Console.ReadLine();
for(int i=0;i<name.Length&&i<score.Length;i++)
{
name[i] = Console.ReadLine("第{0}个同学的姓名是{1}",i,name[i]);
score[i] = Console.ReadLine("第{0}个同学的分数是{1}",i,score[i]);
}
for (int j = 0; j < name.Length; j++)
{
Console.WriteLine("第{0}个同学的姓名:{1},分数:{2}",j,name[j],score[j]);
}