以下程序的运行结果是
class Program
{
static void Main(string[] args)
{
Program pro = new Program();
int n = 8;
Console.WriteLine("{0},{1}", pro.Square(ref n),n);
Console.ReadKey();
}
private int Square(ref int x)
{
x *= 2;
return x;
}
}
A.
8,16 B.
16,16 C.
8,8 D.
16,8
class Program
{
static void Main(string[] args)
{
Program pro = new Program();
int n = 8;
Console.WriteLine("{0},{1}", pro.Square(ref n),n);
Console.ReadKey();
}
private int Square(ref int x)
{
x *= 2;
return x;
}
}
A.
8,16 B.
16,16 C.
8,8 D.
16,8