fork(77) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5.  
  6. class Person
  7. {
  8. public int age;
  9. public Person()
  10. {
  11. age = 1;
  12. }
  13. }
  14.  
  15. class Customer : Person
  16. {
  17. public Customer()
  18. {
  19. age += 1;
  20. }
  21. }
  22.  
  23. public static void Main()
  24. {
  25. var c = new Customer();
  26. Console.WriteLine(c.age);
  27. }
  28. }
Success #stdin #stdout 0.03s 37008KB
stdin
Standard input is empty
stdout
2