views:

16

answers:

2

Hello,

i have this little problem, i use the Application settings in VS 2010 to configure a path. now it would be convenient if i could add a variable there (its an argument) so it looks like this: C:\EXAMPLEDIR\... is there any way todo this? Or should i change the settings at startup in code? is this even possible (i would like to avoid this).

thank you.

GuyFawkes.

A: 

I solved this by creating a method that catches the setting. For example SPECIALFOLDER\Subdir... and then replaces the SPECIALFOLDER with an Environment.SpecialFolder. Voila. Now i can e.g. access the system folder in NT, XP and 7. Plus i can add more custom MY VARIABLE items to replace them accordingly.

greetings

GuyFawkes
A: 

You can also change the scope from Application to User. User settings can be modified at runtime. They are saved if/when you invoke the Save method.

chilltemp