Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. xml file vs .config

xml file vs .config

Scheduled Pinned Locked Moved C#
visual-studiogame-devxmlquestionworkspace
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    humayunlalzad
    wrote on last edited by
    #1

    I have made a simple game and for the name and score/top score, number of turns etc. of the players, I have used an xml file of my own. Would I have any reason to store all that information in the .config file, making my own sections or key value pairs in appSettings. Or is the .config file is only useful when we are talking configuration? I have read many articles on codeproject/msdn etc., but still confused.

    A P V 3 Replies Last reply
    0
    • H humayunlalzad

      I have made a simple game and for the name and score/top score, number of turns etc. of the players, I have used an xml file of my own. Would I have any reason to store all that information in the .config file, making my own sections or key value pairs in appSettings. Or is the .config file is only useful when we are talking configuration? I have read many articles on codeproject/msdn etc., but still confused.

      A Offline
      A Offline
      Arun Jacob
      wrote on last edited by
      #2

      If you want to save the user data like High scores you can use xml.But if you want to use any application settings like path or something you are using in some code behind classes you can use configuration file. For example if you have an upload path in server you can use appSettings. :)

      Arun Jacob http://codepronet.blogspot.com/

      1 Reply Last reply
      0
      • H humayunlalzad

        I have made a simple game and for the name and score/top score, number of turns etc. of the players, I have used an xml file of my own. Would I have any reason to store all that information in the .config file, making my own sections or key value pairs in appSettings. Or is the .config file is only useful when we are talking configuration? I have read many articles on codeproject/msdn etc., but still confused.

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        humayunlalzad wrote:

        Would I have any reason to store all that information in the .config file

        No. I always roll my own.

        1 Reply Last reply
        0
        • H humayunlalzad

          I have made a simple game and for the name and score/top score, number of turns etc. of the players, I have used an xml file of my own. Would I have any reason to store all that information in the .config file, making my own sections or key value pairs in appSettings. Or is the .config file is only useful when we are talking configuration? I have read many articles on codeproject/msdn etc., but still confused.

          V Offline
          V Offline
          vivasaayi
          wrote on last edited by
          #4

          My personal preference for your problem is to use XML files, because I follow the simple rule, 'Use static configuration settings in App.Config file and Runtime settings in a separate file, preferably in XML format for easy reading and writing'.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups