title: C# Convert Action<int> to lambda
body: <p>I have the following code:</p>
  
  <pre><code>int[] iArray = new int[] { 2, 3, 4 };
  Action&lt;int&gt; action = new Action&lt;int&gt;(ShowSquares);
  Array.ForEach(iArray, action);
  
  private static void ShowSquares(int val)
  {
      Console.WriteLine("{0:d} squared = {1:d}", val, val * val);
  }
  </code></pre>
  
  <p>While this code works, I want to convert the second line </p>
  
  <pre><code>Action&lt;int&gt; action = new Action&lt;int&gt;(ShowSquares);
  </code></pre>
  
  <p>to use a lambda expression.</p>
  
  <p>Is this possible?</p>
  
  <p>TIA</p>