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. writing data in config file

writing data in config file

Scheduled Pinned Locked Moved C#
csharpdesignhelp
2 Posts 2 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.
  • M Offline
    M Offline
    Maddie from Dartford
    wrote on last edited by
    #1

    Hello, I am using config file in C# form application. I have provided UI which takes the data form user and on request saves the data to the Properties.Settings.Default.MyVal The problem is that internally(while debugging the application i saw) it knows that the particular data has been modified and reads the modified data but these changes are not reflected in app.config file. How should i save the data to the Properties.Settings.Default.MyVal file so that it reflects to the app.config file exacly. Thanks.

    M 1 Reply Last reply
    0
    • M Maddie from Dartford

      Hello, I am using config file in C# form application. I have provided UI which takes the data form user and on request saves the data to the Properties.Settings.Default.MyVal The problem is that internally(while debugging the application i saw) it knows that the particular data has been modified and reads the modified data but these changes are not reflected in app.config file. How should i save the data to the Properties.Settings.Default.MyVal file so that it reflects to the app.config file exacly. Thanks.

      M Offline
      M Offline
      Matthew Cuba
      wrote on last edited by
      #2

      gajesh wrote:

      The problem is that internally(while debugging the application i saw) it knows that the particular data has been modified and reads the modified data but these changes are not reflected in app.config file.

      I had a couple of thoughts on this, though I'm not an expert: When you are running in debug mode, I thought it wrote changes to a temporary config file in the Debug directory rather than in the project directory. You might check that. Also, how are you writing out application-scoped settings? I know that user-scoped ones can be assigned, but I thought application ones were read-only. I know you can read the XML yourself and do it, but I *thought* only user settings were writable. Good Luck!

      It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?

      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