E.g.
vb.net Code:
  1. Dim parentTable As New DataTable
  2.  
  3. With parentTable.Columns
  4.     .Add("ParentId", GetType(Integer))
  5.     .Add("ParentName", GetType(String))
  6. End With
  7.  
  8. With parentTable.Rows
  9.     .Add(1, "Parent 1")
  10.     .Add(2, "Parent 2")
  11.     .Add(3, "Parent 3")
  12. End With
  13.  
  14. Dim childTable As New DataTable
  15.  
  16. With childTable.Columns
  17.     .Add("ChildId", GetType(Integer))
  18.     .Add("ChildName", GetType(String))
  19.     .Add("ParentId", GetType(Integer))
  20. End With
  21.  
  22. With childTable.Rows
  23.     .Add(1, "Child 1.1", 1)
  24.     .Add(2, "Child 1.2", 1)
  25.     .Add(3, "Child 1.3", 1)
  26.     .Add(4, "Child 2.1", 2)
  27.     .Add(5, "Child 2.2", 2)
  28.     .Add(6, "Child 2.3", 2)
  29.     .Add(7, "Child 3.1", 3)
  30.     .Add(8, "Child 3.2", 3)
  31.     .Add(9, "Child 3.3", 3)
  32. End With
  33.  
  34. 'Create a deferred query.
  35. Dim query = From parentRow In parentTable.AsEnumerable()
  36.             Join childRow In childTable.AsEnumerable()
  37.             On parentRow.Field(Of Integer)("ParentId") Equals childRow.Field(Of Integer)("ParentId")
  38.             Select New With {.ParentId = parentRow.Field(Of Integer)("ParentId"),
  39.                              .ParentName = parentRow.Field(Of String)("ParentName"),
  40.                              .ChildId = parentRow.Field(Of Integer)("ChildId"),
  41.                              .ChildName = parentRow.Field(Of String)("ChildName")}
  42.  
  43. 'Create a generic List of an anonymous type.
  44. Dim list = query.ToList()
The demonstrates a basic join and shows how it's very similar to a SQL join. This example creates a List(Of T) where T is an anonymous type. You can bind that list directly to a grid or whatever you like. You could also define your own type if you need to be able to access its members outside the code that creates the instances, which you can't really do with an anonymous type. If you want a DataTable then you'll have to create one yourself. There is a CopyToDataTable method that is part of LINQ to DataSet but you need DataRows to begin with in order to call that, and you can't have DataRows without a DataTable.