title: Why has a lambda with no capture changed from a static in C# 5 to an instance method in C# 6?
body: <p>This code throws an exception on the marked line:</p>
  
  <pre><code>using System;
  using System.Linq.Expressions;
  
  namespace ConsoleApplication2
  {
      class Program
      {
          static void Main(string[] args)
          {
              Action&lt;int, int&gt; a = (x, y) =&gt; Console.WriteLine(x + y);
  
              ParameterExpression p1 = Expression.Parameter(typeof(int), "p1");
              ParameterExpression p2 = Expression.Parameter(typeof(int), "p2");
  
              // Here is the exception ArgumentNullException.
              MethodCallExpression call = Expression.Call(a.Method, p1, p2);
          }
      }
  }
  </code></pre>
  
  <p>Now, I've tested this code in VS2013 (works like a charm) and in VS2015 Community (throws the exception).</p>
  
  <p>I followed the <a href="http://referencesource.microsoft.com/#System.Core/Microsoft/Scripting/Ast/MethodCallExpression.cs,0782b55921a44627">.Net Reference Source</a>, which led me to some code condition which checkes whether the supplied method <code>IsStatic</code> or not.</p>
  
  <p>In my case, the method I pass (<code>a.Method</code>) is static in VS2013 and for some reason <strong>non static</strong> (instance) in VS2015. If not, it throws, telling me that I did not supply the <code>Instance</code> argument.</p>
  
  <p>Why is it so? How can this be avoided so that <code>Expression.Call</code> would begin to work again in new Visual Studio?</p>