在C#中,下列代码运行的结果是()
class One { public virtual void Show() {
Console.Write("One");
} }
class Two : One{public override void Show(){
Console.Write("Two");
}}
class Program {static void Main(string[] args) {
One obj = new Two();
obj.Show();
} }
AOne
BOne Two
CTwo
DTwo One
相关试题
-
在C#中,下列代码运行的结果是() class One { public virtual void Show() { Console.Write("One
-
C#中下列代码运行结果是() public abstract class A { public A() { Console.Write
-
C#中下列代码运行结果是() public class Student { public virtual void Exam() {
-
在C#中,下列代码需要输出”小狗喜欢吃骨头”,“小猫蹲着睡”,则需要在Main()方法中添加的代码是() class Program { static void Main(s
-
在C#中,以下代码运行结果依次为() static void Show() { Console.WriteLine("大家好!&quo