i have a .txt database for a game and i am making a program to manage this database.... the format is like this

1,"John","usa"
2,"billy","australia"
3,"joe","malaysia"
.
.
.
.
.

there is about 15000 entries!!!!

i read the .txt file line by line and i use split to get the id,country and name of each entry and put it on a listbox... encapsulating the id,country,name in an object... and i add each object in the listbox...

then i can select the entries from the listbox and the name,id and country for selecteditem of listbox are displayed in textboxes....

i allow users to be able to change the country,name from the textbox and i record the change in the listbox....

Now here come the problem..... when the user has made all necessary changes, he/she has to save it back to the .txt file!!! this process take a very very long time to complete as i have to loop through all the listbox,store it in a variable and write the variable in the .txt file!!!! this is very slow..

here's how i save to the .txt..i store id,name and country in a class "entry"

VB Code:
  1. private class entry
  2.   public id as integer,name ,country as string
  3.  
  4.   public sub new(byval i as integer,byval nm as string,byval c as string)
  5.      id=i
  6.      name=nm
  7.      country=c
  8.   end sub
  9.  
  10. end class
  11.  
  12. private sub save()
  13.   dim i as integer,e as entry,out as string=""
  14.   for i=0 to list1.items.count-1
  15.        e=ctype(list1.items.item(i),entry)
  16.        out=e.id & """" & e.name & """," & """" & e.country & """" & vbnewline
  17.   next i
  18. end sub

as i said there are 15000 entries!!! i can't use a database this file is need by a game....

i have tried to use sortedlist used to save the changes but it is slow too!!!!

HELP PLZ!!!!