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(); 
          }
      }
  }
 
C#
C# Quiz
Start Quiz

or Read more about C# Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback