fork download
  1. using System;
  2. using static System.Console;
  3.  
  4. public class Program {
  5. public static void Main() {
  6. var numero = 123;
  7. Func<string, string> func = numero.ToString;
  8. WriteLine(func("000000"));
  9. Func<string> func2 = numero.ToString;
  10. WriteLine(func2());
  11. Action<string> a = delegate(string txt) { WriteLine(txt); };
  12. Action<string> b = txt => WriteLine(txt);
  13. Action<string> c = WriteLine;
  14. a("abc");
  15. b("abc");
  16. c("abc");
  17. }
  18. }
  19.  
  20. //https://pt.stackoverflow.com/q/189905/101
Success #stdin #stdout 0.02s 16224KB
stdin
Standard input is empty
stdout
000123
123
abc
abc
abc