Results 1 to 4 of 4

Thread: configuration file creation, how to?!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    configuration file creation, how to?!

    i have created a simple xml configuration file for my program, it simply reads the values from the xml file during the app loading, using xmltextreader , is that how the usually do it? or should i take a look at the system.configuration namespace? anything usefull there , or its just used for .net config files and not costum files?

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The Configuration namespace is pretty much just for app.config files. The XMLTextReader is fine, really its just a matter of preference. I prefer to use the XMLDocument class but whatever works for you is what you should use.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    thanks, i'll start using xmldocumnet too, the good thing about it is that we can use its events

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    If you are using a app.config file, and you are putting app settings in it, then it is best to just use the System.Configuration namespace to get to them, only one line of code to get your setting:

    Dim mySetting as String = ConfigurationSettings.AppSettings("MySetting")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width