title: Get specific value from datatable with where-clause
body: <p>I want to <code>query</code> a specific value from a <code>DataTable</code>.</p>
  
  <p>Lets say i have a <code>DataTable</code> which contains 2 columns:</p>
  
  <ul>
  <li>id</li>
  <li>item_name</li>
  </ul>
  
  <p>Now what I want to do is like i would do it with mysql: <code>SELECT * FROM "DataTable" WHERE item_name = 'MyItemName'</code></p>
  
  <p>And then get the id that belongs to that 'item_name'...</p>
  
  <pre><code>int blah;
  while (MyReader.Read())
  {
      blah = MyReader.GetInt32("id");
  }
  </code></pre>
  
  <p><strong>Now: how can I do this using <code>DataTable</code>?</strong></p>
  
  <p>I've got a snippet but I can't seem to show the returned value in a messagebox:</p>
  
  <pre><code>string test = Item1txt.Text;
  
  var query = producten.Rows.Cast&lt;DataRow&gt;().Where(x =&gt; x.Field&lt;string&gt;("item_name") == test);
  foreach (var st in query)
  {
      MessageBox.Show(st.ToString());
      // how can i show the id that belongs to "test" ?
  }
  </code></pre>