Configuration file

This is a discussion on Configuration file within the C# Programming forums, part of the General Programming Boards category; I need to have a configuration file to keeps settings for a application that I'm writing. What's the best / ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    53

    Configuration file

    I need to have a configuration file to keeps settings for a application that I'm writing. What's the best / standard way of having a config file. Current I'm using just a .txt file, I'll need to use values in the config file multipe times and don't want to rea the file everytime. Can anyone offer some help.

    JMD

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    C# features several solutions for saving/restoring settings.

    One solution is simply save the settings to the module directory. Another solution is the registry. You can also get Windows default saving directory and store the settings there. The latest solution is called isolated storage. You pass it the level of seperation such as assembly, username, domain, and roaming. It saves and restores the settings without you needing to know where.

    Kuphryn

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    53
    I tried creating a XML .config file. I don't get any error's but the string that holds the Key value is null. Does anyone have an example program? Thanks

    JMD

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  3. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21