Click here to Skip to main content
15,922,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want my program to save some information to use them on the next startup of the program ...
is there any other way better than writing on a text file ???
and if there isn't, can you tell me how to protect this text file and prevent other people from seeing or editing or removing it????

thanks :)
Posted

1 solution

The normal way is to use Application Config files: MSDN[^]
 
Share this answer
 
Comments
George_Rasmi 17-Sep-11 9:11am    
What is application Config files?
how do I use them ???

can you help me with that?
Philippe Mori 17-Sep-11 19:05pm    
It is fairly easy to add a configuration file from Visual Studio if none were already created for your project type.

It is harder to prevent the file from being removed or edited. Generally, if the file is deleted, then the application will uses default values on next startup.

Also, those files are by default hidden in a subdirectory of application data so to edit or delete it, your user really need to want to do it.

If you store sensitive data, it should be encoded. That way, it will be relatively hard to tamper with the data.

If you still want more protection, then your are more on your own...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900