Let's say I have a class called "Names", and it has two properties: firstName and lastName.
And let's say I want to persist the data to a file.
And let's assume that the first time the firstName is "John" and last name is "Doe". I want to persist that to a file (say, names.txt, for instance).
But what I'd like to be able to do, also, is persist more names, say for instance "Tom Smith", "Bob Jones", and "Tim Timson".
Is there a way to do that?
I've figured out how to persist one object to a file (using serialization), but I can't figure out how to do multiple ones.
Advice?