In ASP.net vb, I am reading a .txt file and want to assign a variable to each field in the file. So far I have
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("SomePath\SomeFile.txt")
MyReader.TextFieldType = FileIO.FieldType.Delimited
MyReader.SetDelimiters(",")
Dim currentRow As String()
currentRow = MyReader.ReadFields
A1 = currentRow(0)
A2 = currentRow(1)
A3 = currentRow(2)
I have three fields in each row, so this allows me to assign variables to the 3 fields in the first row which are separated by commas. However, I am having difficulty accessing the next row to create new variables for the following fields. Any ideas how I could assign variables to all the fields in this .txt file? I am very new to this so any help would be much appreciated.
Something like this
edit based on comment