title: Parallel task, while using ContinueWith, result of first action is not finding
body: <p>I am  new to TPL , so just going through some of Tutorials  of  regarding the same , 
  <a href="http://msdn.microsoft.com/en-us/library/dd537609(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd537609(v=vs.110).aspx</a></p>
  
  <p>Here in above Link  i am  trying to Use This Code 
  <code></p>
  
  <pre><code> var displayData = Task.Factory.StartNew(() =&gt; { 
                                           Random rnd = new Random(); 
                                           int[] values = new int[100];
                                           for (int ctr = 0; ctr &lt;= values.GetUpperBound(0); ctr++)
                                              values[ctr] = rnd.Next();
  
                                           return values;
                                        } ).  
                  ContinueWith((x) =&gt; {
                                  int n = x.Result.Length;
                                  long sum = 0;
                                  double mean;
  
                                  for (int ctr = 0; ctr &lt;= x.Result.GetUpperBound(0); ctr++)
                                     sum += x.Result[ctr];
  
                                  mean = sum / (double) n;
                                  return Tuple.Create(n, sum, mean);
                               } ). 
                  ContinueWith((x) =&gt; {
                                  return String.Format("N={0:N0}, Total = {1:N0}, Mean = {2:N2}",
                                                       x.Result.Item1, x.Result.Item2, 
                                                       x.Result.Item3);
                               } );                         
  </code></pre>
  
  <p></code></p>
  
  <p>I am Replacing above code With Mine 
  <code></p>
  
  <pre><code> var taskList = Task.Factory.StartNew(() =&gt; {
                  var newRandom = new Random();
                  var intArray = new int[100];
                  Console.WriteLine("Begining  of First  Iteration");
                  Parallel.For(0, intArray.GetUpperBound(0) - 1, i =&gt;
                  {
                      intArray[i] = newRandom.Next();
                      Console.WriteLine(i);
                  });
                  Console.WriteLine("End of First Iteration");
  
              }).ContinueWith((x) =&gt; {
                  Console.WriteLine("Beginning of Second  Iteration");
                  int n = x.Result.Length;
                  long sum = 0;
                  double mean;
  
                  for (int ctr = 0; ctr &lt;= x.Result.GetUpperBound(0); ctr++)
                      sum += x.Result[ctr];
  
                  mean = sum / (double)n;
                  Console.WriteLine("End of  Second Iteration");
                  return Tuple.Create(n, sum, mean);
                  });
  </code></pre>
  
  <p></code></p>
  
  <p>I am getting the Error :: 
  </p>
  
  <pre><code>'System.Threading.Tasks.Task' does not contain a definition for 'Result' and no extension method 'Result' accepting a first argument of type 'System.Threading.Tasks.Task' could be found (are you missing a using directive or an assembly reference?) 
  </code></pre>
  
  <p></p>
  
  <p>It not finding  the "Result"</p>
  
  <p>What  i am doing wrong ??</p>