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(); 
          }
      }
  }
 

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты