What should be modified for the following code to compile successfully?
 
namespace Test 
{ 
     class TypeA 
     { 
           class TypeB:TypeA 
           { 
                public override void MethodA() {     
    Console.WriteLine("TypeB"); } 
        } 

        public virtual void MethodA() { Console.WriteLine("TypeA"); } 
    } 

    class Prоgrаm
    { 
        static void Main(string[] args) 
        { 
             TypeA a = new TypeA(); 
             TypeB b = new TypeB(); 
             a.MethodA(); 
             b.MethodA(); 
             Console.ReadLine(); 
          }
      }
  }
 

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes