目测没错,这个编译器有问题。。。?
using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
string[,] result=new string[,]{{"吴松","89"},{"铁东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何昆","93"},{"关欣","85"}};
string temp="";
int maxscore=0;
for(int i=0;i<result.GetLongLength(0);i++)
{
if(int.Parse(result[i,1])>maxscore)
{
temp=result[i,0];
maxscore=int.Parse(result[i,1]);
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",temp,maxscore);
}
}
}