title: Are values in LINQ expressions passed by reference?
body: <p>I'm reading manning book about LINQ, and there is an example:</p>
  
  <pre><code>    static class QueryReuse
      {
         static double Square(double n)
         {
           Console.WriteLine("Computing Square("+n+")...");
           return Math.Pow(n, 2);
         }
         public static void Main()
         {
           int[] numbers = {1, 2, 3};
           var query =
                    from n in numbers
                    select Square(n);
  
           foreach (var n in query)
                Console.WriteLine(n);
  
           for (int i = 0; i &lt; numbers.Length; i++)
                numbers[i] = numbers[i]+10;
  
           Console.WriteLine("- Collection updated -");
  
           foreach (var n in query)
               Console.WriteLine(n);
      }
  }
  </code></pre>
  
  <p>with the following output:</p>
  
  <pre><code>Computing Square(1)...
  1
  Computing Square(2)...
  4
  Computing Square(3)...
  9
  - Collection updated -
  Computing Square(11)...
  121
  Computing Square(12)...
  144
  Computing Square(13)...
  169
  </code></pre>
  
  <p>Does this means, that 'numbers' is passed by reference? Does this behavior have to do something with lazy execution and yield? Or I'm on a wrong track here?</p>