When you read the lines inside your
for
loop, you have not split them at all - and you don't do anything useful with them even if you had.
The first thing you need to do is read the comment you teacher put in your homework:
So replace that comment with another call to string.Split and save the new array of strings that generates.
But then the array will be a fresh, new one - so it's indexes will start from zero again, not be randomly numbers ass 3, 4, 5, and 6!
So change the indexes inside your
for
loop to reference the actual data.
But ... even then, you aren't doing anything with the data, other than storing it in four variables which you then overwrite the next time round the
for
loop, throwing away the previous lines data!
So you need a collection (an Array, List, whatever you are familiar and comfortable with) to save the data in, and I'd suggest that creating a Customer class to hold a single customers data would be a good idea - you can then add each separate customer to your collection for later processing.