I want to declare a variable that accept 0,1,-1 but want this variable hold these data (0,1,-1)like database. at first i thought to declare this variable in App.config but App.config is read only. I don't want insert these data in database or in text or XML i want to put these data in source program that any one cant access to them
Asked
Active
Viewed 399 times
0
-
Is the variable only needed at runtime. Can you set it once and than forget it while running? – Andreas Jun 28 '11 at 07:06
-
I set variable when the program is running and i want the variable hold the data and next time when i run program again the variable contain the data – mo_al Jun 28 '11 at 07:43
1 Answers
2
Configuration Settings are cached in the memory when you starts the application. you can deal with the app.config file as xml to change the values. So you can make changes to it and add you variables to it, they will be reflected the next time you start your application.

Bibhu
- 4,053
- 4
- 33
- 63
-
this is my code :
-
@mo_al - Have look at this link. http://stackoverflow.com/questions/5468342/how-to-modify-my-app-exe-config-keys-at-runtime/5468395#5468395 – Bibhu Jun 28 '11 at 07:48