title: Get Distinct Values and Converting back into DataTable
body: <p>I have a "result" which is DataTable and I like to get the x distinct values(City) and convert it back to DataTable how do I do this the code below gives me an error</p>
  
  <pre><code> Dim query = (From x In results.AsEnumerable()
                           Select (x.Field(Of String)("City"))).Distinct().CopyToDataTable()
  </code></pre>
  
  <p>so what I want is records of distinct cities I can get that but the problem I am having is converting it back to Datable. </p>
  
  <p>Edited:</p>
  
  <p>I am using "where" in this statement and it does convert to Table(works fine) but not on "select"</p>
  
  <pre><code> Dim results = (From myRow In ds.Tables(1).AsEnumerable()
              Where (myRow.Field(Of String)("xxxx") = xxxx)
                             Select myRow).Distinct().CopyToDataTable()
  </code></pre>