<分区>
namespace AbstractImplementation
{
public class baseclass
{
public virtual void testingSealed()
{
Console.WriteLine("This is testingSealed base");
}
}
public class derived : baseclass
{
public override void testingSealed()
{
Console.WriteLine("This is testing derived");
}
}
class Program
{
static void Main(string[] args)
{
derived der = new derived();
der.testingSealed();
}
}
}
这将给出输出“This is testing derived”。是否可以从 der.testingSealed() 获取“This is testingSealed base”?