title: Nested 'froms' in LINQ
body: <p>I'm new in LINQ and I have problem with nested froms:</p>
  
  <pre><code>using System;
  using System.Linq;
  class MultipleFroms
  {
      static void Main()
      {
          char[] chrs = { 'A', 'B', 'C'};
          char[] chrs2 = { 'X', 'Y', 'Z' };
          var pairs = from ch1 in chrs
                      from ch2 in chrs2
                      select ch1+" "+ ch2;
          Console.WriteLine("For ABC and XYZ: ");
          foreach (var p in pairs)
              Console.WriteLine(p);
          Console.WriteLine();
  
          Console.WriteLine("For D and W: ");
          chrs = new char[] { 'D' };
          chrs2 = new char[] { 'W' };
          foreach (var p in pairs)
              Console.WriteLine(p);
      }
  }
  </code></pre>
  
  <p>In output I have:</p>
  
  <pre><code>For ABC and XYZ:
  A X
  A Y
  A Z
  B X
  B Y
  B Z
  C X
  C Y
  C Z
  
  For D and W:
  A W
  B W
  C W
  </code></pre>
  
  <p>But I expected:</p>
  
  <pre><code>...
  For D and W:
  D W
  </code></pre>
  
  <p>Why <code>pairs</code> in second case used "old" <code>chrs</code>, <code>{ 'A', 'B', 'C'}</code> instead <code>{'D'}</code> ?</p>