Create a configuration file (XML or INI)

G

Guest

Hi,

I would like to create a configuration file using INI file or XML.
Does anyone as a very good example about it please ?
i've seen several XML example but not all are working or are quite simple to
maintain...

thanks a lot.
 
R

Rob Teixeira

Well, depends on what you want to do. In .NET, you can create an App.Config
file (just right-click on solution explorer for your project and pick Add
New Item, App.Config). This is an XML file that you can put whatever
settings you want in as long as you follow the standards. You can they use
the System.Configuration.ConfigurationSettings.AppSettings functions to read
the values in the XML file. If you search on that class, you'll get some
examples. However, it's exactly like an INI file because there are no
functions to modify it, and modifications are ignored while the program runs
because the file is only read at the beginning of your app startup.

Here are a few links that might help you with some alternatives, though one
is in C#.

http://www.developer.com/net/asp/article.php/3287991
http://www.codeproject.com/csharp/cs_ini.asp
http://www.devx.com/dotnet/Article/7008/1954?pf=true

-Rob Teixeira
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top