fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. new Person();
  8. new Person("John");
  9. }
  10.  
  11. public class Person
  12. {
  13. public Person()
  14. {
  15. Console.WriteLine("default ctor");
  16. }
  17.  
  18. public Person(string name)
  19. {
  20. Console.WriteLine("custom ctor");
  21. }
  22. }
  23. }
Success #stdin #stdout 0.02s 15816KB
stdin
Standard input is empty
stdout
default ctor
custom ctor