title: C# - How to iterate through a list of lists
body: <p>I have a class --</p>
  
  <pre><code>public class AccountNumber
  {
      [PrimaryKey, AutoIncrement]
      public int Id { get; set; }
      public string AccountNumber_RecordID { get; set; }
      public string AccountNumber_SegmentLength { get; set; }
      public string AccountNumber_Number { get; set; }
  
  }
  </code></pre>
  
  <p>I'm using LINQ to XML to get the list --</p>
  
  <pre><code>List&lt;AccountNumber&gt; accNum = 
   (from p in xmlDocument.Descendants("AccountNumber")                                      
    select new AccountNumber
    {
        AccountNumber_RecordID = (string)p.Element("RecordID").Value,
        AccountNumber_SegmentLength = (string)p.Element("SegmentLength").Value,
        AccountNumber_Number = (string)p.Element("Number").Value
    }).ToList();
  </code></pre>
  
  <p>I have a SQLite db created from the class AccountNumber. I want to use the entire list in an update statement. But how do i iterate through the list? </p>
  
  <p>I want something like this, but not sure how to achieve it. </p>
  
  <pre><code>foreach accNum
          {
                 db.Insert(accNum); 
          }
  </code></pre>