title: Using C#, LINQ - want to get column names AND data values
body: <p>I want to display, in a fairly generic manner, the contents of one row; I'll be using this technique against a few different tables.  The output will be plain text (in a RichTextBox), something like this:
  TABLE_NAME
  PROPNUM: xxxxxxx
  SALE DATE: mm/dd/yyyy
  ...
  LAST COL: lastvalue</p>
  
  <p>(a) I know the column names for each table, but really don't want to hard-code them;<br>
  (b) I'd like it to be flexible enough to work if the table structures change.   </p>
  
  <p>I've figured out how to iterate through the column names - but not how to reference the corresponding data values!</p>
  
  <pre><code>var arQuery = (from acp in ... select acp).FirstOrDefault(); // one &amp; only one match
  foreach (var colName in arQuery.GetType().GetProperties())
  ...
  </code></pre>
  
  <p>colName now gets each column name, in turn; how do I then reference the corresponding value, in arQuery, for that column?  (Note: I'm perfectly happy to turn this on its head, and iterate through each column's value ... if I knew how to get to the column name for each value...)(Yes, I'm kinda new to C# and LINQ ... be kind, please!)</p>
  
  <p>Thanks!</p>