fork download
  1. using System;
  2.  
  3. [Serializable]
  4. class Foo
  5. {
  6. static int i = 0;
  7.  
  8. public Foo()
  9. {
  10. f = returnInt;
  11. }
  12.  
  13. private int returnInt()
  14. {
  15. return i;
  16. }
  17.  
  18. Func<int> f;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(18,23): warning CS0414: The private field `Foo.f' is assigned but its value is never used
error CS5001: Program `prog.exe' does not contain a static `Main' method suitable for an entry point
Compilation failed: 1 error(s), 1 warnings
stdout
Standard output is empty