fork download
  1. using System;
  2.  
  3. class Foo
  4. {
  5. private void bar() {
  6. Console.WriteLine("Hello from parent");
  7. }
  8. }
  9.  
  10. class Baz:Foo {
  11. public void bar() {
  12. Console.WriteLine("Hello from child");
  13. }
  14. }
  15.  
  16.  
  17. public class Test
  18. {
  19. public static void Main()
  20. {
  21. Baz b = new Baz();
  22. b.bar();
  23. }
  24. }
Success #stdin #stdout 0.02s 15876KB
stdin
Standard input is empty
stdout
Hello from child