Re: xml configuration file
You could write your own config file, and read/write it using the XmlSerializer class. Or use the XmlWriter/XmlReader classes.
However you will still need a way of telling the system where it is : i.e. a File/Open menu item or something.
It's not good practice to expect users to manually alter the contents of a config file : the setup should be done inside of your application using a form so you have complete control over the format of the file. Users can (and inherently will) make mistakes when editing the file, whereas if you control its writing in code it won't.
Darwen.
Re: xml configuration file
Thanks darwen :)
But I need the user to change the config file before running the program since this program is gonna be run in the console...
Re: xml configuration file
The config file has to be named yourapp.exe.config and has to placed in the folder where your yourapp.exe resides. Than it can be easily used. User can edit this file. But I agree with darwen that it is task only for advanced user.
To app.config - it is only VS hack/feature. If you have app.config file in your project, after compilation VS copies it to output folder under name assembly.exe.config. (And overrides file already existing file).
Re: xml configuration file
With console apps you're better off using command line arguments.
Darwen.