If Dim firstline As Boolean firstline = True While Not sr.EndOfStream If firstline = True Then Dim cols = sr.ReadLine.Split(";") For Each col1 In cols If col1 = "first_col" Then For Each col In cols firstline = False dt_table.Columns.Add(New DataColumn(col, GetType(String))) Next End If Next Else Dim data() As String = sr.ReadLine.Split(";") dt_table.Rows.Add(data.ToArray) End If End While End If
For Each
For
data
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)