title: Where clause in C# linq to datatable
body: <p>I have two columns with <code>Col1</code> and <code>col2</code> in data table like below:</p>
  
  <p><img src="https://i.stack.imgur.com/vJDk7.jpg" alt="enter image description here"></p>
  
  <p>note:</p>
  
  <p>col1 contains only us or uk, no other values</p>
  
  <p>Now my requirement is to separate the values based on us and uk.</p>
  
  <p>Like below get all the values corresponding to us and uk seperately.</p>
  
  <p>Earlier I have done this with linq code. At that time my requirement is a simple one,</p>
  
  <p>just get all the records in <code>col2</code>:</p>
  
  <pre><code>string[] data = dt.AsEnumerable()
    .Select(s =&gt; s.Field&lt;string&gt;("col2"))
    .ToArray&lt;string&gt;();
  </code></pre>
  
  <p>now in the new requirement I need them separately based on us and uk.</p>