Forums WoW Modding Discussion Miscellaneous [Archive] Parsing a Line and putting it to array error

[Archive] Parsing a Line and putting it to array error

[Archive] Parsing a Line and putting it to array error

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
06-07-2016, 09:26 AM
#11
Archived author: barncastle • Posted: 2016-06-07T09:26:19+00:00
Original source

I might be missing something but your current code will only return one record and stores it in strvector which is already an array? If you want to parse the entire CSV you'll need something like a list or dictionary and add strvector to it each time it reads a line - you'll need to remove the Found check for that.

To get column count you could do something like ReadedLine.Split(',').Length. To get the a row's field count do the same on strvector i.e. strvector.Length.
rektbyfaith
06-07-2016, 09:26 AM #11

Archived author: barncastle • Posted: 2016-06-07T09:26:19+00:00
Original source

I might be missing something but your current code will only return one record and stores it in strvector which is already an array? If you want to parse the entire CSV you'll need something like a list or dictionary and add strvector to it each time it reads a line - you'll need to remove the Found check for that.

To get column count you could do something like ReadedLine.Split(',').Length. To get the a row's field count do the same on strvector i.e. strvector.Length.

rektbyfaith
Administrator
0
06-07-2016, 10:01 AM
#12
Archived author: dashker • Posted: 2016-06-07T10:01:33+00:00
Original source

thanks, :3
rektbyfaith
06-07-2016, 10:01 AM #12

Archived author: dashker • Posted: 2016-06-07T10:01:33+00:00
Original source

thanks, :3

Pages (2): Previous 1 2
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)