Skip to content

Instantly share code, notes, and snippets.

@NPS-ARCN-CAKN
Created September 7, 2017 21:20
Show Gist options
  • Save NPS-ARCN-CAKN/956cb98fc5d62ad6e1c2854b487f9685 to your computer and use it in GitHub Desktop.
Save NPS-ARCN-CAKN/956cb98fc5d62ad6e1c2854b487f9685 to your computer and use it in GitHub Desktop.
VB .NET: Create DataTable
Dim MyDataTable As New DataTable
With MyDataTable
.Columns.Add("Name", GetType(String))
.Columns.Add("Age", GetType(Integer))
.Rows.Add("Sketr", 24)
.Rows.Add("Big Guy", 8)
End With
For Each Row As DataRow In MyDataTable.Rows
Debug.Print(Row.Item("Name") & Row.Item("Age"))
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment