Converting a Datatable into an Enumerable

While you can just iterate over a datatable’s rows using a for each loop, if you want to use LINQ for processing the rows, you need to change the format of the object since the DataTable does not support LINQ out of the box.

' Option #1
Dim rows As IEnumerable(Of DataRow) = myTypedTable.Cast(Of DataRow)();
' Option #2
Dim rows As DataRow() = myTypedTable.Select()