有没有更简单的代码
using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
object [,] names = new object[8, 2]{
{"吴松",89},{"钱东宇",90},{"伏晨",98},{"陈陆",56},{"周蕊",60},{"林日鹏",91},{"何昆",93},{"关欣",85}
};
object temp = 0;
object maxscore = 0;
object name = null;
for (int i = 0; i < names.GetLongLength(0); i++)
{
temp = names[i, 1];
if ((int)maxscore < (int)temp)
{
maxscore = temp;
name = (string)names[i, 0];
}
else
{
continue;
}
}
Console.Write("分数最高的是" + name + ",分数是" + maxscore+",");
}
}
}