storing application configuration/initialization

C

Claire

Hi
We're newish to visual studio .net.
I wanted to store some user defined variables. Normally I'd have written
these to the registry but my colleague informed me that Microsoft was trying
to dissuade users away from the registry and towards configuration files.
So I had a look at the
System.Configuration.ConfigurationSettings.AppSettings object he told me
about.
Can this file be written on the fly? The only info Ive found about these
seems to point to some poor little sod having to create the files manually
using XML before they can be read by your application.
Can anyone advise me on the best direction to go and if there are any
classes I should be using for future compatibility.
thanks
 
C

Claire

Thanks Artur,
Looks a bit complex and messy.
All the whizzy stuff M/s have written for us, I wonder why the shortfall in
this particular area if they don't want us to stick with the registry.
 
A

Artur Zakrzewski

Yes, it may look complicated at the first glance but actually it is
really simple.
About the registry. To my knowledge the only reason why Microsoft says
that registry is not suitable for storing app configuration is that .NET
Framework is open standard and they would like to see its implemenation
for other platforms where there is nothing like registry. Obviously .NET
applications that use the registry could not work in such environments
(Of course they would still work on Win OS)

Regards,

Artur
 

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