You only seem to have one CustName - I assume it is declared prior to the code you show. You need many variables if you want to have many values. Change your code to declare a new variable each time around the loop, replace the body of the if(line!=null)
with
count++;
var theName = code to extract name from line;
Add_to_List(theName, count);
If you still have a problem after doing this then show us the code for 'code to extract name from line'
Paul Linton
Star
13403 Points
2531 Posts
Re: Adding entries to a List defined for a class
Apr 20, 2012 07:24 AM|LINK
Don't worry about my previous post.
You only seem to have one CustName - I assume it is declared prior to the code you show. You need many variables if you want to have many values. Change your code to declare a new variable each time around the loop, replace the body of the if(line!=null) with
If you still have a problem after doing this then show us the code for 'code to extract name from line'