Skip to content

Save/Load a list

Sergio Fonseca

Asked Feb 27, 2008, 11:25 AM EST2 answers
Share
LinkedInX
I've made an application that try random 4 length numbers without repeating them using a list to check if the number is already tried but now I need a way to save and load the list to don't repeat if the application crash or have to be closed.
Thank you

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    You could try using the registry.  After you check your list build a comma seperated string of your lists values then save the string to a registry eg [HKEY_CURRENT_USER\your key\your list\\123,456,789 repeat the process each time you update the list. if you close your application or it crashes, the registry will have a current list of values for you to re-load when needed.  There probably is a better way this may be a start.
    0
  • 0
    I made it using txt files but thank you for your help.
    0