title: C# strongly typed datasets - passing different datatables to the same method (interface?)
body: <p>I am trying to pass separate typed dataset data tables to the same method. The datatables are similar, but distinct.  The method performs the same function on the datatables.  Instead of essentially duplicating the method and changing the parameter type depending on the datatable type, is there a way to do something along the lines of creating a custom interface for the datatables, that way I can have a single method with a parameter of the interface type?</p>
  
  <p>what I currently have:</p>
  
  <pre><code>private PassdownDataset.SalesOrdersForManagerDataTable datatable1;
  private PassdownDataset.SalesOrdersDataTable datatable2;
  
  public SomePublicMethod()
  {
  PopulateDepartmentName(datatable1);
  PopulateDepartmentName(datatable2);
  }
  
  private void PopulateDepartmentName(PassdownDataset.SalesOrdersForManagerDataTable dt)
  {
  //(operations performed on datatable)
  }
  
  private void PopulateDepartmentName(PassdownDataset.SalesOrdersDataTable dt)
  {
  //(operations performed on datatable)
  }
  </code></pre>
  
  <p>what I would like to have:</p>
  
  <pre><code>private PassdownDataset.SalesOrdersForManagerDataTable datatable1;
  private PassdownDataset.SalesOrdersDataTable datatable2;
  
  public SomePublicMethod()
  {
  PopulateDepartmentName(datatable1);
  PopulateDepartmentName(datatable2);
  }
  
  private void PopulateDepartmentName(
                 PassdownDataset.CommonInterfaceForBothDataTables dt)
  {
  //(operations performed on datatable)
  }
  </code></pre>