[求助]看看那里错了
新得分超出了储存的最高得分,则以下程序应该交换变量Top_score和New_score的值
class Interchange
{
int Top_score;
int New_score;
int Temp;
public void Swap()
{
Top_score = 5;
New_score = 10;
Temp = Top_score;
New_score = Top_score;
Top_score = New_score;
}
public void Display()
{
Console.WriteLine("The new value of top score is :");
Console.WriteLine(Top_score );
Console.WriteLine("The old value jof top score was:");
Console.WriteLine(New_score);
}
public static void Main()
{
Interchange I1=new Interchange ();
I1.Swap();
I1.Display ();
}
}
}