Configuration Files

I

Ivan Weiss

Hey all,

I am trying to add a configuration file to my app so that I can store
configuration options and provide a form to allow the user to change
them. I know that these used to always be in the form of ini files. I
am trying to learn new techniques (OOP etc..) and trying to make my app
as modern as possible. Are XML files the preferred method of doing
this? Whatever the correct way of handling configuration files is, can
someone please provide a link to a tutorial or some good help and how to
work with either ini files, xml files, or whatever is out there as I
have never had a need for a local configuration file in the past.

Thanks!

-Ivan
 
T

Terry Williams

You can also save, edit and delete your configurations in the registry.

Set the filter on your search in help to .NET and then search for
'registry' or 'registry key'. It will return several results.

The help files come in handy sometimes, when researching theories and
solutions.
 
C

Cor

Hi Ivan,

What is prefered. But an ini file is not prefered.

You can use the dataset methode (do not become scared).

It is very simple to build your config file with it.

You can read it with dsConfig.readXML("myconfig.xml")
You can write it with dsConfig.writeXML("myconfig.xml)"

The most simple method to build it is to open a dataset in your solution
explorer and add the "elements" to it

If you have than questions, ask again.

I hope this helps?

Cor.
 
O

One Handed Man

Search for PSS ID Number: Q313405

This describes another method which you can use.

Regards - OHM
 
I

Ivan Weiss

I was reading through those posts as suggested and noticed they are
app-wide settings. Will these work for local settings also per each
client. I want it to contain very basic information like the folder
that my access database is stored in (since it will be stored on a
server I want each user to be able to have the option of mapping a drive
etc...) Can I use those classes as described in the article you
provided or do I need to write my own class to read/write from xml
files. It seems that this is something the .NET framework should
provide considering it used to provide functions for dealing with ini
files.

-Ivan
 

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