المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Help add new section to this config please



C# Programming
09-17-2011, 01:41 AM
In short, I need help on how to add a new section such as:


along with

keys go here
To a config file laid out like:
</span span class="code-SummaryComment"version/spanspan class="code-keyword"="/spanspan class="code-keyword"1.0"/span span class="code-SummaryComment"encoding/spanspan class="code-keyword"="/spanspan class="code-keyword"utf-8"/span span class="code-SummaryComment"?/spanspan class="code-SummaryComment"> Group1
I have been trying to do this for nearly a day, trying every method I could find to do so, but I was unsuccessful so I decided its time to ask for help. I even went as far as fully implementing this code (http://www.c-sharpcorner.com/UploadFile/yougerthen/404082008080449AM/4.aspx)[^ (http://www.c-sharpcorner.com/UploadFile/yougerthen/404082008080449AM/4.aspx)] into my program and I still could not get it to work properly (it added a section, but it added the key and value to the block, not to an block and I was unsure as to how to fix it.

Trying my best to understand all I can about the Mysteries of configuration (http://www.codeproject.com/KB/dotnet/mysteriesofconfiguration.aspx)[^ (http://www.codeproject.com/KB/dotnet/mysteriesofconfiguration.aspx)]....but it seems to do a lot more than I need it to do (it goes into detail about adding custom sections, which I don't really need, keys and value is all I need in a section).