1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | using System; public class Test { public static void Foo(Action Bar) { Bar(); } public static void Main() { Foo(Bar: () => { Console.LineWrite("42"); }); } } |
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFRlc3QKewoJcHVibGljIHN0YXRpYyB2b2lkIEZvbyhBY3Rpb24gQmFyKQoJewoJCUJhcigpOwoJfQoKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQlGb28oQmFyOiAoKSA9PiB7CgkJCUNvbnNvbGUuTGluZVdyaXRlKCI0MiIpOwoJCX0pOwoJfQp9
prog.cs(13,33): error CS0117: `System.Console' does not contain a definition for `LineWrite' /usr/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error) Compilation failed: 1 error(s), 0 warnings
-
result: Compilation error (maybe you wish to see an example for C#)


