using System; [Serializable] class Foo { static int i = 0; public Foo() { f = returnInt; } private int returnInt() { return i; } Func<int> f; }
Standard input is empty
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
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!