My preference in this situation is to create a DataSet with DataTables for the configuration data arranged in a nice relational way - then use DataSet.WriteXML() to save it to a configuration file.
Then to load it again, you just use DataSet.ReadXML() and it's back in a nice query-able object.
This is an example config file that my app allows the user to edit in a Text Editor window:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!--****************************************************************
Config File: FileToExcel_test.cfg
Author: Ron Savage
Date: 06/20/2008
Description:
File to test parsing a file into an Excel workbook.
Modification History:
Date Init Comment
06/20/2008 RS Created.
******************************************************************-->
<!--********************************************************************
Global Key Definitions
********************************************************************-->
<config key="sqlTimeout" value="1800"/>
<config key="emailSMTPServer" value="smtp-server.austin.rr.com"/>
<config key="LogFile" value="FiletoExcel_test_{yyyy}{mm}{hh}.log"/>
<config key="MaxEntries" value="1"/>
<!--********************************************************************
Delimiter Configurations
********************************************************************-->
<config key="pipe" value="|"/>
<!--********************************************************************
Source / Target Entries
********************************************************************-->
<config key="source_1" value="FILE, c:\inetpub\ftproot\filetoexcel.txt, pipe, , , , , "/>
<config key="target_1" value="XLS, REPLACE, c:\inetpub\ftproot\filetoexcel1.xls, , , , , , , ,c:\inetpub\ftproot\filetoexcel_template.xls, ,3"/>
<config key="notify_1" value="store_error, store_success"/>
</configuration>
When I load it into the DataSet, all the non-comment tags reside in a table named Config with fields Key & value. Very easy to search.
Ron