Using setting file
Posted on 2008-10-24
Im going from VB6 to C# 2008. I have project with will use Windows Form for about 100 users. Every of this user will have connection to database and I need to save connection string somewhere. In VB6 I save this info in text file in directory where is EXE. I need when some data to connection string are changed to replace this file in all 100 PC in customers and they to work with new connection string. SO I cant use exe.config file, because in it will have other information that is custom depend and when I replace this file I will loose this custom depend information.
So question is:
1. I want to work in new lay in VS2008, I add new separate setting file and want to use it. Question here is:
- can you provide me with simple code that save and read string to this new setting file?
- Where is this file on HDD ? Can I replace it with Windows Explorer with other setting file (with same format, but with different data?)
2. If I decide to use old lay (to create .txt file in .exe directory) will Vista allow this?