title: How to pass System.Action parameter with lambda expressions for ForEach?
body: <p>When trying to use a lambda expression instead of the <code>AddressOf</code> operator, with a parameter for <code>ForEach</code> sub I am getting the following error:</p>
  
  <blockquote>
    <p>Statement lambdas cannot be converted to expressions trees</p>
  </blockquote>
  
  <p>This is the <code>AddressOf</code> code, which works:</p>
  
  <pre><code>lista.ForEach(new Action(Of String)(AddressOf Console.WriteLine))
  </code></pre>
  
  <p>This is the lambda code which produces the error:</p>
  
  <pre><code>lista.ForEach(new Action(Of String)(Function(x) x = "teste")
  </code></pre>
  
  <p>The method <code>ForEach</code> is being invoked so the <code>Action</code> needs to be passed as a parameter.</p>
  
  <p>Can anyone could help me with this or tell me whether it's possible or not?</p>