|
-
Aug 18th, 2006, 06:42 AM
#1
Thread Starter
Member
[RESOLVED] [2.0] Properties.Settings
i'm using C# vs2005
when building winforms, i can store any setting configuration in the Properties.Settings.
My question is : can i change the configuration programmatically ?
because i got some error say that the Properties.Settings is read only.
-
Aug 18th, 2006, 06:49 AM
#2
Re: [2.0] Properties.Settings
I always code my own version of that class, gives me better flexibility. The Settings object itself may be readonly but its properties aren't (unless specifically defined).
I don't live here any more.
-
Aug 18th, 2006, 08:51 AM
#3
Re: [2.0] Properties.Settings
Settings with Application scope are read-only. That's because they are stored in the main config file in the program folder, which users with limited accounts will not have write access to. Settings with User scope are read/write because a copy is stored under each user's Application Data folder. Every user is guaranteed to have write access to their own Application Data folder. Note though, that this means that if one user changes the setting values it will have no effect on any other users. This is a good thing in some situations and a bad thing in others. If I need to write to the main config file I implement my own class that does so through an XmlDocument object, but I always check that the current user has access to the folder first.
-
Aug 19th, 2006, 02:57 AM
#4
Thread Starter
Member
Re: [2.0] Properties.Settings
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|