fork download
  1. module Program
  2. {
  3. class Initializer
  4. {
  5. public Name : string { get; set; }
  6. public event HelloHandler : Action[string];
  7.  
  8. public SayHello() : void
  9. {
  10. HelloHandler($"Hello, $Name!");
  11. }
  12.  
  13. public static Test() : void
  14. {
  15. def hellower = Initializer() <-
  16. {
  17. Name = "David Hilbert";
  18. HelloHandler += Console.WriteLine;
  19. };
  20.  
  21. hellower.SayHello();
  22. }
  23. }
  24.  
  25. Main() : void
  26. {
  27. Initializer.Test();
  28. }
  29. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.nem:5:28:5:31: error: missing body of a non-abstract and non-extern method in method Program.Initializer.get_Name() : string
prog.nem:6:12:6:39: error: unbound type name `Action'
prog.nem:6:12:6:39: error: unbound type name `Action'
prog.nem:6:12:6:39: error: unbound type name `Action'
prog.nem:6:12:6:39: error: unbound type name `Action'
stdout
Standard output is empty