class Program { static void Main(string[] args) { B obj = new B(); Console.ReadKey(); } } abstract class A { public A() { Console.WriteLine("This is the A class"); //calc(); } public abstract void calc(); } class B : A { public B() { Console.WriteLine("This is the B class"); } public override void calc() { Console.WriteLine("This is the abstract methode"); } } Questions: 1. What will be printed on the console? 2. what will be printed to the console if we remove this "//" before the calc() in the contractor of class A;
Anónimo
1. "This is the A class" "This is the B class" 2. "This is the A class" This is the abstract method "This is the B class"