title: Using LINQ to return just two specific DataTables in a DataSet with several DataTables
body: <p>How can I use LINQ to return just two specific DataTables in a DataSet with several DataTables? For example, in the code snippet below, is it possible to add LINQ to <code>myDS.Tables</code> in the <code>foreach</code> statement?</p>
  
  <p>I want to remove the <code>if</code> statement if possible.</p>
  
  <pre><code> DataTable myTable1 = new DataTable("MyTable1");
   DataTable myTable2 = new DataTable("MyTable2");
   DataTable myTable3 = new DataTable("MyTable3");
   DataSet myDS = new DataSet();
   myDS.Tables.Add(myTable1);
   myDS.Tables.Add(myTable2);
   myDS.Tables.Add(myTable3);
  
   foreach (DataTable table in myDS.Tables)
   {
      if (table.TableName != "MyTable1" &amp;&amp; table.TableName != "MyTable2")
      {
          continue;
      }
      Console.WriteLine();
      Console.WriteLine("Table Name = " + table.TableName);
   }
  </code></pre>