求解释下面的这两个点,
例子:
string[] lines = text成绩.Lines;
string maxName = "";
int maxScore = -1;
foreach (string line in lines)
{
string[] str = line.Split('=');
string name = str[0];
string strScore=str[1];
int score = Convert.ToInt32(strScore);
if (score > maxScore)
{
maxName = name;
maxScore = score;
}
}
MessageBox.Show(string.Format("{0}是第一名,成绩是{1}!",maxName,maxScore));
|