title: Newbie to Interface and oop concepts
body: <p>I understand the concept of an interface in oop but implementing it is challenging for me.  These are my classes:</p>
  
  <pre><code>Public Class Alpha 
     Public Property Id As Integer
     Public Property StartDate as Date
     Public Property System as string
     Public Sub Deserialize(ByVal row As DataRow)
         Me.Id = row("Id ") ...
     end sub
  end class
  
  Public Class Bravo
     Public Property Id As Integer
     Public Property StartDate as Date
     Public Property Dosage as integer
     Public Sub Deserialize(ByVal row As DataRow)
         Me.Id = row("Id ") ...
     end sub
  end class
  
  Public Class Parent
     Public Property Id As Integer
     Public Property Name as String
     Public Property AdmitDate as Date  
     Public Sub Deserialize(ByVal row As DataRow)
         Me.Id = row("Id ") ...
     end sub     
  end class
  
  Public Class AlphaList inherits List(of Alpha)
      Public Sub Deserialize(table As DataTable)
       For Each objRow As DataRow In table.Rows
          Dim obj As New Bravo            
          obj.Deserialize(objRow)            
          Me.Add(obj)
       Next
      end sub    
  end Class
  
  Public Class BravoList inherits List(of Bravo)
      Public Sub Deserialize(table As DataTable)
       For Each objRow As DataRow In table.Rows
          Dim obj As New Bravo            
          obj.Deserialize(objRow)            
          Me.Add(obj)
       Next
      end sub
  end Class
  
  Public Class ParentList inherits List(of Parent)
      Public Sub Deserialize(table As DataTable)
       For Each objRow As DataRow In table.Rows
          Dim obj As New Parent
          obj.Deserialize(objRow)            
          Me.Add(obj)
       Next
      end sub
  end Class
  </code></pre>
  
  <p>Currently, I have the following two functions in Class Parent</p>
  
  <pre><code>public Sub RunA(aList as AlphaList )
      For each item as Alpha in alist
         item.Id ....
      next
  end sub
  public Sub RunB(bList as BravoList )
      For each item as Bravo in bList 
         item.Id ....
      next
  end sub
  </code></pre>
  
  <p>Basically, they have the same implementation, the only thing different is the argument - either a AlphaList or BravoList.</p>
  
  <p>I want to create a function in Class Parent that takes any AlhpaList or BravoList.  How would I do this?  Thanks in advance!!  .. I would like to extract it out all together and do some thing like (pseudocode) :</p>
  
  <pre><code>public sub Run ( anyList List of Alpha or Bravo, any list of List of Parent)
  </code></pre>