I am new to C# so if this question has been asked, I apologize. I assure you I have been googling for over an hour.
I need to store setting SETS (As compared to individual settings). So I am thinking some type of XML format will be best but it would seem using the CONFIGURATION or SETTINGS item types may be better. I am creating an application that will synchronize a series of folders. But I need some type of external file so that it can be edited without editing the application source each time. But I also do not want to use the APP.CONFIG file because I want to simply be able to replace the entire file without affecting other configuration.
Here is the XML file I am using now
<Customer>
<CUSTOMERID>1</CUSTOMERID>
<HOSTNAME>HOSTNAME</HOSTNAME>
<PASSWORD>PASSWORD</PASSWORD>
</Customer>
<Customer>
<CUSTOMERID>2</CUSTOMERID>
<HOSTNAME>HOSTNAME</HOSTNAME>
<PASSWORD>PASSWORD</PASSWORD>
</Customer>
<Customer>
<CUSTOMERID>3</CUSTOMERID>
<HOSTNAME>HOSTNAME</HOSTNAME>
<PASSWORD>PASSWORD</PASSWORD>
</Customer>
<Customer>
<CUSTOMERID>4</CUSTOMERID>
<HOSTNAME>HOSTNAME</HOSTNAME>
<PASSWORD>PASSWORD</PASSWORD>
</Customer>
I need to be able to cycle through this settings file by doing a FOREACH CUSTOMER yada yada
So what I am trying to say is the SETTINGS format doesn't seem to have any way to store "SETS" of settings (So I wouldn't be able to say FOR EACH CUSTOMER because each setting has to have a unique name). And the App.config file contains other settings that I do not want the user to mess with, so where should I store these settings and how should I access them?
No comments:
Post a Comment