2 Dimensional Array value assignment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LegaCyE
    New Member
    • Jun 2010
    • 1

    2 Dimensional Array value assignment

    Hello everyone,

    I'm trying to create a program the reads from a CSV file, splits the comma seperated values and assigns them into a 2 dimensional array with the first dimension as line number(intLineC nt)and the second as the count of the comma seperated values. I believe my logic to be correct but I am unable to test because of a build error stating "Array subscript expression missing" on the 3rd line of code.
    Code:
      Do While srBillFile.Peek > 0
                strLine(intLineCnt) = srBillFile.ReadLine
                aryLine(intLineCnt, ) = strLine(intLineCnt).Split(",".ToCharArray
    
                intLineCnt += 1
            Loop
    So I guess my question is how do I assign the values to this array changing the first dimension for each line and the second for each CSV value for that line.

    Any help would be appreciated.

    Thanks
Working...