Removing elements from files

starcraft

Well-known member
Joined
Jun 29, 2003
Messages
167
Location
Poway CA
I have so many usernames and passwords i cant keep trake of them all. So i made a password program that takes the title\username\password and wights a file. Well then i made a viewer so i could look at the passwords but i wont to create a way to remove an entry. ok heres how i hope it will work: They click button1 and it shows textbox1-3 they type the EXACT information and if it matchs an entry it removes all three items
 
Depending on what you mean by "so many", I think Id create a simple little Password class that has the three properties you want (marked Serializable) then store them in an arraylist and any time you add or remove an item just serialize the arraylist. The confirming on removal should be trivial at that point because you could just get the password object and test its values against what the user typed in.

Now by "so many", if you mean more than youd want to sit in memory as a whole, then Id say you should be using a different technology (LDAP, Database, etc.) to be doing this.
 
Back
Top