Why is System.Configuration read-only?

  • Thread starter Thread starter Dan Noel
  • Start date Start date
D

Dan Noel

I see many rich classes in System.Configuration, but all of these classes
are read-only.

While I have many rich classes for extracting information from a config
while, I am reduced to the most primitive XML classes when writing data to
an config file.

Is there a technical reason why System.Confuration does not contain
read/write methods. Is the framework trying to protect me from myself?Why
 
I think its more trying to promote good practice. Config details are
configuration for the app and tend to be fixed.

Changing config in asp.net tends to restart the web application, as such its
not the right place for data that changes - configuration data is just
that - its configuration, not a flexible database, and it should not change.
In the next relase of .NET this is likely to be improved on to allow you to
work better with config details.

--
Regards

John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
 
Back
Top