HI, I need to add multiple configuration files in my application. What is the easiest way to read a key value from these files? Currently I am using xmldocument class and select the node using an xpath expression. Is there any other simple way to do this in C# 2.0
Share
I had a similar need and found this to be extremely useful and simple. http://www.codeproject.com/KB/cs/cs_ini.aspx It is an INI file reader and writer, you just specify the header tag and the item name and it will read or write from a file. It gives you strings and you can cast them with some try blocks.
INI is really a much simpler format than XML if you have less than fifty config options and they are not nested.