在下面的例子里 using System; class A { public A() { PrintFields(); } public virtual voi
在下面的例子里
using System;
class A
{
public A()
{
PrintFields();
}
public virtual void PrintFields(){}
}
class BA
{
int x=1;
int y;
public B()
{
y=-1;
}
public override void PrintFields()
{
Console.WriteLine(x={0},y={1},x,y);
}
当使用new B()创建B的实例时,产生什么输出?