Click here to Skip to main content
15,918,617 members
Home / Discussions / C#
   

C#

 
AnswerRe: system information Pin
musefan17-Mar-09 3:21
musefan17-Mar-09 3:21 
QuestionModifying Windows Service app.config file Pin
User 265531917-Mar-09 1:57
User 265531917-Mar-09 1:57 
AnswerRe: Modifying Windows Service app.config file Pin
Michael Bookatz17-Mar-09 2:35
Michael Bookatz17-Mar-09 2:35 
GeneralRe: Modifying Windows Service app.config file Pin
User 265531917-Mar-09 2:41
User 265531917-Mar-09 2:41 
GeneralRe: Modifying Windows Service app.config file Pin
Michael Bookatz17-Mar-09 2:54
Michael Bookatz17-Mar-09 2:54 
GeneralRe: Modifying Windows Service app.config file Pin
User 265531917-Mar-09 2:56
User 265531917-Mar-09 2:56 
AnswerRe: Modifying Windows Service app.config file Pin
Le centriste17-Mar-09 2:43
Le centriste17-Mar-09 2:43 
AnswerRe: Modifying Windows Service app.config file Pin
Simon P Stevens17-Mar-09 5:04
Simon P Stevens17-Mar-09 5:04 
It's not storing the value in the app.config file.

The settings object that you have added in visual studio automatically generates a bunch of code that uses the System.Configuration stuff.

Settings that you have chosen to be "Application" settings are stored in the app.config file, and cannot be modified in code. Settings that you choose to be "User" settings have their default value placed in the app.config file, but when you save a change to the value, the save is made to a config file stored in the current users local settings directory. ("C:\documents and settings\username\local settings\apps\appname\appversion\...." I think)

At runtime, when you request a value, the CLR first looks in the c:\docs & settings\... location to load a value from there. If there isn't anything there, it then goes to the app.config file, and finally, if there is nothing there, it uses a default value that is hard coded into the app.

This is why your app.config file always says 0. This is just the default value that is used when no user specific value exists.

Simon

QuestionSwitch Statement Help Pin
Paul Unsworth17-Mar-09 1:36
Paul Unsworth17-Mar-09 1:36 
AnswerRe: Switch Statement Help Pin
Pete O'Hanlon17-Mar-09 1:41
mvePete O'Hanlon17-Mar-09 1:41 
GeneralRe: Switch Statement Help Pin
Paul Unsworth17-Mar-09 1:42
Paul Unsworth17-Mar-09 1:42 
AnswerRe: Switch Statement Help Pin
DaveyM6917-Mar-09 1:41
professionalDaveyM6917-Mar-09 1:41 
AnswerRe: Switch Statement Help Pin
benjymous17-Mar-09 1:43
benjymous17-Mar-09 1:43 
QuestionC# Encryption and Decrypt in Java Pin
satsumatable17-Mar-09 1:02
satsumatable17-Mar-09 1:02 
AnswerRe: C# Encryption and Decrypt in Java Pin
SeMartens17-Mar-09 1:54
SeMartens17-Mar-09 1:54 
AnswerRe: C# Encryption and Decrypt in Java Pin
Mbah Dhaim17-Mar-09 7:08
Mbah Dhaim17-Mar-09 7:08 
QuestionProcess.Start() parameter with space char problem Pin
half-life17-Mar-09 0:48
half-life17-Mar-09 0:48 
AnswerRe: Process.Start() parameter with space char problem Pin
Eddy Vluggen17-Mar-09 1:07
professionalEddy Vluggen17-Mar-09 1:07 
GeneralRe: Process.Start() parameter with space char problem Pin
half-life17-Mar-09 1:39
half-life17-Mar-09 1:39 
Questionhow to get out from the outer for Pin
erdem0117-Mar-09 0:16
erdem0117-Mar-09 0:16 
AnswerRe: how to get out from the outer for Pin
Xmen Real 17-Mar-09 0:25
professional Xmen Real 17-Mar-09 0:25 
AnswerRe: how to get out from the outer for Pin
Eddy Vluggen17-Mar-09 0:27
professionalEddy Vluggen17-Mar-09 0:27 
AnswerRe: how to get out from the outer for Pin
Simon P Stevens17-Mar-09 0:29
Simon P Stevens17-Mar-09 0:29 
AnswerRe: how to get out from the outer for Pin
Eslam Afifi17-Mar-09 0:40
Eslam Afifi17-Mar-09 0:40 
AnswerRe: how to get out from the outer for PinPopular
Pete O'Hanlon17-Mar-09 0:53
mvePete O'Hanlon17-Mar-09 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.