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. .NET (Core and Framework)
  4. Settings in VS 2005 C#

Settings in VS 2005 C#

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpvisual-studioquestionworkspace
3 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
    Mike Osbahr
    wrote on last edited by
    #1

    Per usual it has to be as confusing as possible when it comes to C#. Something simple in VB like My.Settings.name becomes appnamespace.Properties.Settings.Default.name. This isn't really that bad except that the word Default is associated with both User and Application settings. The first time Settings.Default.Save() is executed, which by the way can only affect User settings, my definition of the word default goes out the window. Even though there are lines of code buried in the designer which contain System.Configuration.DefaultSettingValueAttribute, the values associatied with them have nothing to do with the values returned by Settings.Default following a save. For reasons I have yet been unable to fathom the initial value for all settings is stored both in the designer code and the app.config file. The next thing I should do is change the app.config file manually and see which "default" value is actually returned. No real question this time. Just needed to vent a bit... >>>-----> MikeO

    P 1 Reply Last reply
    0
    • M Mike Osbahr

      Per usual it has to be as confusing as possible when it comes to C#. Something simple in VB like My.Settings.name becomes appnamespace.Properties.Settings.Default.name. This isn't really that bad except that the word Default is associated with both User and Application settings. The first time Settings.Default.Save() is executed, which by the way can only affect User settings, my definition of the word default goes out the window. Even though there are lines of code buried in the designer which contain System.Configuration.DefaultSettingValueAttribute, the values associatied with them have nothing to do with the values returned by Settings.Default following a save. For reasons I have yet been unable to fathom the initial value for all settings is stored both in the designer code and the app.config file. The next thing I should do is change the app.config file manually and see which "default" value is actually returned. No real question this time. Just needed to vent a bit... >>>-----> MikeO

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      :confused:

      M 1 Reply Last reply
      0
      • P Paul Conrad

        :confused:

        M Offline
        M Offline
        Mike Osbahr
        wrote on last edited by
        #3

        I have an engineering rather than a software background, so maybe a word like default has a different meaning for me than it does for a real programmer. I modified a value in the app.config file and ran the debugger. The value used by the program was the value in the app.config file. Later, when I looked at the Settings.settings designer, it identified the mismatch. Apparently the value in the Setttings.Designer.cs is used only by the designer. Some of this is making more sense except for the use of Default in the namespace. >>>-----> MikeO -- modified at 13:54 Wednesday 5th July, 2006

        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