fork download
  1. using System;
  2.  
  3. public class A
  4. {
  5. public void show()
  6. {
  7. Console.WriteLine("In A show");
  8. }
  9. }
  10.  
  11. public class B : A
  12. {
  13. public void show()
  14. {
  15. Console.WriteLine("In B show");
  16. }
  17. }
  18.  
  19.  
  20.  
  21. public class Test
  22. {
  23. public static void Main()
  24. {
  25. // your code goes here
  26. A obj = new B();
  27. obj.show();
  28. }
  29. }
  30.  
Success #stdin #stdout 0.05s 28760KB
stdin
Standard input is empty
stdout
In A show