So, I’m trying to read from a text file and store each line into an object, and then each individual value (split by ‘,’) into a list. Here’s a quick example:
Text file dummy information:
1, Book One, 22, 5
2, Book Two, 10, 3
3, Book Three, 5, 15
But if for example, line 2 had the following:
Text file dummy information:
1, Book One, 22, 5
2, Book Two, 10, 3, 22.0, 5
3, Book Three, 5, 15
If I understand correctly, It seems that checking the length of the current holdingArray should tell you which line has more -or less- values than expected. After all, you are splitting the lines by the comma character.