title: VS2010 save array/collection data to a file while debugging
body: <p>Is there some way to save array/list/collection data to a file while debugging in VS2010?</p>
  
  <p>For example, in this code:</p>
  
  <pre><code>var addressGraphs = from a in context.Addresses
                      where a.CountryRegion == "Canada"
                      select new { a, a.Contact };
  
  foreach(var ag in addressGraphs) {
     Console.WriteLine("LastName: {0}, Addresses: {1}", ag.Contact.LastName.Trim(),
                       ag.Contact.Addresses.Count());
  
  
  
     foreach(var Address in ag.Contact.Addresses) {
        Console.WriteLine("...{0} {1}", Address.Street1, Address.City);
     }
  }
  </code></pre>
  
  <p>I'd like to set a breakpoint on the first 'foreach' line and then save the data in 'addressGraph' to a file.</p>
  
  <p>where 'a' contains fields such as:</p>
  
  <pre><code>   int addressID
     string Street1
     string City
     &lt;Ect.&gt;
  </code></pre>
  
  <p>and 'Contact' contains fields such as:</p>
  
  <pre><code>   string FirstName
     string LastName
     int contactID
     &lt;Ect.&gt;
  </code></pre>
  
  <p>I'd like the file to contain the values of each of the fields for each item in the collection.</p>
  
  <p>I don't see an obvious way to do this. Is it possible?</p>