vb Code:
  1. Dim table As DataTable = DS.Tables(0)
  2.             Dim TableRow As DataRow = table.Rows(table.Rows.Count - 1)
  3.             If DS.Tables(0).Rows.Count > 0 Then
  4.                 NewTableName = DS.Tables(0).Rows(TableRow).Item("CourseID").ToString()
  5.             End If


Can't Convert Integer into DataRow

How do I make TableRow a Integer while keeping the table.Rows(table.Rows.Count -1) ? I'm trying to get the last index then set it to add to that on a NEW TABLE