I have created a function that reads a Tab Delimited text file and create a data table as per it's header arrangement.
below is my code:
Private Function MakeDataTable(ByRef XSplitLine) As DataTable
Dim AMZTable As New DataTable
Dim i = 0
For Each item In XSplitLine
AMZTable.Columns.Add(XSplitLine(i).ToString)
i += 1
Next
Return AMZTable
End Function
XSplitLine
is an array that holds header Name(First Line in that text file) from a text file. As you can see I have not mentioned any data types while creating columns but still it executes without any error.
My question is what type of Value can be stored in these columns as I haven't mentioned it in the code?