What will be the output of the following code? using System;class A { public void DemoA() { Console.WriteLine(Method of class A); } } class B : A { public void DemoB() { Console.WriteLine(Method of class B); } } class Test { static void Main (string[] args) { A a=new B(); a.DemoA(); a.DemoB(); } }
Reveal answer
Fill a bubble to check yourself