Save and load user settings?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuzz13
    New Member
    • Jun 2010
    • 110

    #1

    Save and load user settings?

    I am writing a project that uses settings established by the user and I would like to make those settings saveable so the user doesn't have to enter them every time. There are several fields so I don't know how I would save those fields and load them again. I am thinking using streamwriter to output all the settings to a txt file then using streamreader and identifying each new line as a new variable to load back into the appropriate fields. This should work but seems like it might be a long answer to a question with a simpler answer. Can anyone suggest something more convenient then the write it out read it in that I mentioned?
  • Subin Ninan
    New Member
    • Sep 2010
    • 91

    #2
    Make use of Settings


    Last edited by Subin Ninan; Nov 1 '10, 12:52 AM. Reason: Formatting error

    Comment

    • Bassem
      Contributor
      • Dec 2008
      • 344

      #3
      Fuzz13,
      Use XML, and use LINQ to XML to manipulate the file. This would be the best way but according to your needs you should go.

      Subin Ninan,
      The link is broken. I think it is better to post the actual link, not the redirect one.

      Comment

      • Fuzz13
        New Member
        • Jun 2010
        • 110

        #4
        Bassem I am still pretty new to programming and I have not learned about XML and LINQ yet. Can you direct me to some good info about them? I assume they are not just methods and/or classes for use so they probably have tons of info to learn about?

        Comment

        • Bassem
          Contributor
          • Dec 2008
          • 344

          #5
          hey probably have tons of info to learn about?
          I pointed you to the simplest way to do your task. I think you would take less than 1 day to learn it and use it.

          Here is a good start:
          Introduction to LINQ - Simple XML Parsing
          I just googled for 1 minute to get that link. You can find a lot of tutorials.

          Comment

          Working...