Difference in CSC and Roslyn compiler's static lambda expression evaluation?
Consider the following example code. class Program { static void Main( string[] args ) { DoSomethingWithAction( i => { Console.WriteLine( "Value: {0}", i ); } ); Console.ReadLine(); } private static void DoSomethingWithAction( Action<int> something ) { Console.WriteLine( something.Target == null ? "Method is static." : "Method is not static." ); something( 5 ); } } If I compile and run this code under Debug using the Visual Studio 2010 (under CSC compiler) it will print out the following result: Method is not static. Value: 5 If I compile the same code in Visual Studio 2010, but this time