title: C# Action, Func , Can be Nested or Chaining?
body: <p>I am Novice in Delegate (in English too).</p>
  
  <p>This is my sample code:</p>
  
  <pre><code>var expected_for = new int[Length];
  
  Func&lt;int[], Action&lt;int&gt;&gt; opFactory = res =&gt; i =&gt; res[i] = arg1[i] + arg2[i];
  
  Parallel.For(0, arg1.Length, opFactory(expected)); // working well
  
  Enumerable.Range(0, arg1.Length).ToList().ForEach(opFactory(expected_foreach));  // working well
  
           for (int i = 0; i &lt; arg1.Length; i++)
              {
                  opFactory(expected_for); //No Error, but expected_for is not changed
              }
  </code></pre>
  
  <p>Q1. <code>Func&lt;int[], Action&lt;int&gt;&gt; opFactory = res =&gt; i =&gt; res[i] = arg1[i] + arg2[i];</code>
     in <code>Func</code>, <code>Action</code> can be nested? This is too difficult to understand for me.</p>
  
  <p>Q2. <code>Parallel.For</code>'s third argument requires <code>Action</code>. Then my <code>Func</code> Line was <code>Action</code>?</p>
  
  <p>Q3. How can I save value in <code>for()</code>? </p>
  
  <p>Thank you for reading</p>
  
  <p>Regards</p>
  
  <p>ICE</p>